How to use AWS for running e2e tests in parallel?

I don’t know much about AWS and I am not a software engineer. What I only know is that AWS can let us create virtual instances of computers on the cloud. I think that can be quite useful for parallel testing of e2e tests which are often slow and flaky. So, I want to figure out what to learn in order to do such parallel testing? Which AWS training or courses can I take? Which other things do I need to know besides AWS?

This is the approach I have in mind for parallel e2e testing -
1 - Deploy the application across multiple large AWS instances. E.g. 10 servers.
2 - Make multiple tiny instances which will run only one or few e2e tests. E.g. 100 personal computers.

Number of parallel e2e tests = 100 PCs * 10 parallel tests per PC = 1000.
Average time per test = 5 minutes.
Time to completed all tests = 5 mins instead of 5 * 1000 = 5000.

The 1000 tests can be split across 10 servers. This sounds quite powerful to me, but I don’t know how to implement it.

4 Likes

which are often slow and flaky

uhm… maybe one should focus on making them faster and more reliable?

what to learn in order to do such parallel testing

that’s usually more a question about the test automation framework, not AWS. usually the bottleneck is no the application but the test runner and in the case of browser based e2e, the browsers. but that might be different in your case. what tech stack are you working with? what makes the tests take 5 minutes to run?

The 1000 tests can be split across 10 servers. This sounds quite powerful to me, but I don’t know how to implement it.

i know of serenity bdd with cucumber which has a mechanism to split the scenarios into 10 similar batches based on runtime and then you could pass 10 different urls as parameter. but for now I doubt that’s the right approach. tell me more about your setup first :slight_smile:

Hey,

To run end-to-end (e2e) tests in parallel on AWS, you can use AWS Device Farm, which is a cloud-based mobile and web application testing service. Device Farm allows you to run e2e tests in parallel on real mobile devices and web browsers, which can significantly reduce the overall testing time.

Here are the steps to use AWS Device Farm for running e2e tests in parallel:

  1. Create a new project in AWS Device Farm and upload your e2e test suite.
  2. Select the devices and browsers you want to use for testing. AWS Device Farm has a wide range of devices and browsers that you can choose from, including iOS and Android devices, as well as popular web browsers like Chrome and Firefox.
  3. Configure your test environment by setting up any necessary dependencies or configuration files.
  4. Run your e2e tests in parallel on the selected devices and browsers.
  5. View the test results and analyze any failures or errors.

AWS Device Farm also provides integrations with popular testing frameworks like Appium, Espresso, and XCTest, which makes it easy to run e2e tests in parallel on AWS. Additionally, you can use AWS CodePipeline to automate the testing process and trigger e2e tests on AWS Device Farm after each code deployment.

2 Likes

I’m not some big automation bad-ass, but if you’re using Selenium this can be done with the Selenium grid in order to run tests in parallel, for example on a few virtual machines or similar.

1 Like
  1. Set up an AWS account if you haven’t already done so.
  2. Create an EC2 instance or instances to run your tests on. Make sure to choose an instance type that has enough processing power to run your tests in parallel.
  3. Install any necessary software or dependencies on the EC2 instance(s).
  4. Configure the EC2 instance(s) to connect to your application or test environment. This may involve setting up security groups, creating SSH keys, and other network-related tasks.
  5. Write your e2e tests and make sure they can run in parallel.
  6. Use a tool like AWS CodeBuild, AWS CodePipeline, or AWS Lambda to orchestrate the parallel execution of your tests across multiple EC2 instances.
  7. Monitor the test results to ensure that all tests complete successfully.

Here are some more specific steps you can follow to use AWS CodeBuild for parallel e2e testing:

  1. Set up your AWS CodeBuild project by specifying the source code repository, build environment, and other settings.
  2. Define the build specification file (buildspec.yml) that will be used to run the tests. The build specification file should include the commands to install any necessary dependencies and run the tests.
  3. Configure the build project to use a parallel build, specifying the number of instances to use.
  4. Add the appropriate IAM roles and permissions to your CodeBuild project so that it can access your AWS resources.
  5. Trigger the CodeBuild project to start the parallel e2e tests. This can be done manually, via the AWS CLI, or through a webhook from your source code repository.

By following these steps, you can use AWS to run e2e tests in parallel, which can
help you speed up your testing and improve the quality of your software. Hope this will help you out.