8000 GitHub - makarey/lambda-selenium: Use Selenium Webdriver and Chrome inside AWS Lambda
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

makarey/lambda-selenium

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda-Selenium

Welcome to the lambda-selenium project! The purpose of this project is to show how to use Selenium Webdriver with Amazon Web Services (AWS) Lambda compute service.

Running The Example

Install the serverless framework

npm install serverless -g

Use shell commands to clone the repository and change the working directory to the Java example

git clone https://github.com/makarey/lambda-selenium.git
cd lambda-selenium/lambda-selenium-java/

Packaging A New Function

To package the jar and deploy it, run the following command inside the lambda-selenium-java directory

gradle clean unzipLibs shadowJar deploy

This will package all of the required dependencies and code within the jar file. The libraries that we included in the resources folder will also be included in this jar. Once the jar has been built, you can find it in the build/libs folder. This jar will then be deployed as a new lambda function using the serverless framework.

Note: If you change the name to a different lambda function in the serverless.yml, you must change the name of the function that is invoked in the code in the class com.epam.testing.lambda.LambdaSeleniumService

Now the function is ready to be invoked.

Next, run the test suite 'ExampleTestSuite' inside the same shell:

gradle clean test

When the tests are ran, they will be executed in parallel by invoking the Lambda function that was created. Once the tests are complete, open folder './build/screenshots' to view screenshots taken inside the running tests. If a test fails, the exception will be thrown for the test case and logged to the console.

About

Use Selenium Webdriver and Chrome inside AWS Lambda

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%
0