Docs/Advanced Features

Performance

Browser tests are slower than unit tests by design, but there is a lot of room between a snappy suite and a painful one. This page collects the levers that move the needle.

Biggest wins

  • Run tests in parallel. The CLI defaults to CPU count; set --workers to override.
  • Reuse auth state. Log in once per worker, not once per test.
  • Wait on conditions, not clocks. Fixed waits are the top source of wasted time.
  • Mock heavy third-party calls that are not under test.
  • Keep tests focused. One outcome per test beats mega-flows.

Profile a slow test

bash
assrt run tests/checkout.yaml --profile

A profile shows time per step so you can see where the wall-clock goes and where waits are hiding.