13
Sep

Design for Parallel tests

Consideration for Parallel testing with Automated scripts

There are a few key points to pay attention to when designing tests for parallel execution, but are also best practices for any type of testing setup.

Your tests should be:

  • Independent: The test should not depend on anything other than the defined setup and teardown methods, nor the order of execution
  • Concise: Test one feature at time and have your tests fail with intelligible error messages, so you can isolate failing components or features correctly
  • Repeatable: Your test should return the same result on the same version of the target application or website, using the same set of test parameters. In other words, your tests should not be susceptible to issues due to network delays or server performance.
  • Reproducible: Your test should returning the same result on the same version of the target application or website using a different set of test parameters. For example, changing the browser, browser version, or host operating system should not produce different test results.

These best practices are often very challenging to follow, as they place a great burden on the test framework to set up concise tests that are repeatable, reproducible and independent. The Sauce Labs documentation wiki includes examples of how to set up tests that follow these best practices, along with additional tips.