Execute functional test cases in any web application using natural language. Move away from statically coding your test cases using tools like selenium or puppeteer. Let a generative ai agent test the scenario and provide you with the test results.
This project implements an automated web UI testing framework that remotely controls a browser and simulates user interactions on a site. You can execute this project locally using AWS credentials or remotelly. If executing remotelly, a grid of containers will execute the test cases. The navigation is implemented with the help of a LLM (Claude3 Sonnet). The LLM will navigate, choosing the actions that need to be executed. LLM is aware of HTML source code, actionable elements, his past actions and remaining interactions available.
The solution can execute different types of test cases for authentication, creation of tickets, searching for products, adding products into shopping cart, empty shopping cart etc. It simulates clicking buttons, entering data and more to try to execute a functional test case in a web application. You can integreate this test automation tool with any sort of pipeline using the architecture below:
To run this project, the following are needed:
- Java 17 or higher
- Apache Maven
- ChromeDriver (or other browser driver depending on browser used for testing)
- An AWS account with access to Amazon Bedrock and Claude3 Sonnet.
- Clone the project repository
- Run
mvn package
to build the application - Authenticate your CLI to your AWS environment
- Run locally using the debugger of your favorite IDE (I tested using VSCode)
java -jar target/genai-selenium-1.0-SNAPSHOT.jar
- Run remotelly using API Gateway and SQS:
cdk deploy test-automation
#look for SERVICE_URL Output within the Outputs tab of the test-automation stack in AWS CloudFormation
export MY_API_GATEWAY_URL =
curl "$MY_API_GATEWAY_URL" \
-H 'Content-Type: application/json' -d @sample-test-payload.json \
--user "$AWS_ACCESS_KEY_ID":"$AWS_SECRET_ACCESS_KEY" \
--aws-sigv4 "aws:amz:us-east-1:execute-api"
To deploy using an existing VPC, update file cdk.json
and add the VPC id as a parameter as shown in the image below. Then run cdk deploy test-automation
Guideline for contributing
This project is licensed under the MIT-0 license.