At some point in your test automation, you will run into a common problem: Too many automated UI tests take too long to execute.
The most powerful way to speed things up is to execute tests in parallel. Unfortunately, getting automated tests to run in parallel is not so easy. Typically, thread safety is not something that is baked into automation. Thread safety ensures that the code is written so that a program can run and manipulate data structures without unintended consequences.
There are mandatory requirements for tests that can run in parallel. These are the same conditions that some of our customers use to help run 50,000 automated tests per day. Here are the four requirements.
1. Your tests must be atomic
Your automated tests should form a single irreducible unit. This means tests should be extremely focused, and each should test just one thing. A single automated test should not test something such as end-to-end automation.