Skip to content

Best practices

Good tests come from good habits as much as good tools. These nine practices help you get reliable results with less maintenance.

Automation reduces manual testing but doesn’t remove the need for it. Automate the checks that are repetitive, stable and valuable, and keep exploratory and one-off checks manual.

  • Make each test stand on its own. Dependent tests are hard to understand and can’t run in parallel, because parallel tests start at the same time.
  • Keep tests focused. Around 30 steps is easiest to debug and runs fastest. Avoid going beyond 50 to 60 steps, because long tests are hard to maintain and hard to diagnose when they fail.

Early in a product’s life, frequent UI changes and releases can break existing tests on every build. Use stable selectors, reuse common steps through imported test cases, and use Impact Analysis to update a changed selector across many tests at once.

Teams automate to get consistent results. A test that fails unpredictably costs more debugging time than it saves. Fix it or retire it.

Assertions check that the text or value you expect appears during the run. Ending a test with one reduces false positives and makes results more accurate. See Assertions.

Technique matters as much as automation itself. Store variables, application variables, scripts and data-driven tests save execution time and keep tests short.

Run tests as you create them instead of waiting until your whole automation setup is finished. A test suite can run on demand, on a schedule, through the API or from your CI/CD pipeline.

A good name describes the functionality being tested, so anyone can understand it a year later, including new team members. When some tests in a large set fail, clear names show you which functionality is broken. Also use tags, descriptions and priorities to keep your tests organized.

Don’t leave test automation with one engineer. Give several team members access so they understand the setup and can contribute. Use User management to control who can do what.