Skip to content
RED SAGSkills
mediumAutomation Test Engineer interview question

Your suite needs to run in parallel across many workers. What do you change to make that safe?

What the interviewer wants to hear

  • Remove shared mutable state and order dependencies
  • Unique test data per test or worker
  • Separate accounts or tenants for tests that change settings
  • Thread-safe driver or fresh browser contexts
  • Sharding across machines and merged reports

Model answer

First I find shared state. Tests that depend on running in order, static drivers, or global accounts all break in parallel. I give each test its own data from factories with unique ids, so two tests never fight over the same email or cart. Tests that change global settings get their own account or tenant per worker, or they are tagged to run serially. In Selenium I make sure each thread has its own WebDriver, for example with ThreadLocal; in Playwright each test already gets a fresh browser context. I then run the suite in random order a few times to flush out hidden dependencies. To scale beyond one machine, I shard the suite in CI and merge the reports so results are still in one place. Finally I check the environment can handle the extra load.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Automation Test Engineer questions