QA The Other WayQuality assurance for the age of AI-written tests. QA The Other Way.
Test Architecture

A separate browser is not a separate account

Browser contexts isolate cookies. They do not stop two tests changing the same server record. Give parallel writers distinct accounts and data.

6 min readQA The Other Way
Three separate laboratory sample jars, illustrating independent test state.
AI-generated editorial illustration.
Illustrative video for this article. English on-screen text; select subtitles for this language.

Two illustrative tests run at the same time. One expects a profile's timezone to be UTC. The other saves Europe/Riga. Each test has a fresh browser context, so the team calls them isolated. The first still fails because both browsers are logged into the same account. Cookie isolation did not isolate the record on the server.

This distinction matters when an agent generates more coverage than your old suite had. Parallel execution can expose shared-state assumptions that were hidden when tests ran one after another. The practical artifact is an ownership map: which test may write which account and record, and when that state is reset.

Draw the two boundaries separately

Playwright's authentication guide explains browser-context isolation and loading authenticated state. It also warns that tests which modify server-side state should use different accounts when concurrent use would affect another test. A context is a client boundary. An account, tenant or record namespace is an application boundary. Neither is a substitute for the other.

List both in review. A generated test should identify the context it uses and the data it may modify. If it only reads immutable content, sharing an account can be reasonable. If it changes settings, creates orders or edits a shared document, review account and record ownership before increasing parallel workers.

Choose the smallest useful ownership unit

The Playwright guide documents one account per parallel worker for tests that modify server-side state. That can reduce interference across workers. It does not mean every test inside a worker can leave arbitrary changes behind. Reset or seed the state each test needs, and make cleanup explicit.

Sometimes the safer unit is a unique record per test rather than an account per test. For a team-owned task list, separate accounts may still write the same shared list. For a checkout flow, a unique cart or order namespace may be necessary. Choose the unit from the product's actual sharing rules, not from the browser API's name.

A data contract an agent can follow

Write four fields beside each scenario: owner namespace, setup state, allowed writes and cleanup behavior. An illustrative contract might reserve a staging user for one worker, seed an empty cart before the test, permit creating only synthetic orders, and delete those orders after retaining the failure evidence. State what happens when cleanup fails; otherwise the next run inherits a mystery.

Keep setup independent of another test's success. Playwright fixtures provide a structured lifecycle for preparing and releasing test resources. Use that lifecycle to make ownership legible, not to hide a global shared account behind a convenient fixture name. The reviewer should be able to find who owns every mutable resource.

A QA team can use this map to spend less time chasing accidental cross-test failures. A team without QA can begin with one critical flow and one bounded staging account pool. Neither needs to build a huge environment before measuring whether the first flow is useful.

Authentication state is a secret-bearing file

Playwright warns that saved browser state may contain cookies and headers that can impersonate an account. Its guide discourages committing those files into repositories, including private ones. Treat them as credentials: keep them out of source archives, restrict access and regenerate them when appropriate.

Never give an exploratory agent a production session just because login setup feels inconvenient. Use staging accounts with the permissions needed for the scenario. A separate browser carrying an administrator cookie is still an administrator.

Count false failures as real work

Track failures caused by shared state separately from product regressions. Include the minutes spent reseeding accounts and investigating interference in an automation pilot's repair cost. More generated tests can increase coverage, but they can also increase contention if ownership is unclear. The saving arrives when useful coverage and predictable data reduce repeat work, not when the test count alone goes up.

Common questions

Does a new browser context isolate server data?

No. It separates client-side browser state, but two authenticated contexts can still modify the same account or server record.

Should every test use a different account?

Not necessarily. Playwright documents shared accounts for tests that do not interfere and one account per parallel worker for server-state writers. Shared product records may need further separation.

Can I commit authenticated storage state?

Playwright warns that it may contain cookies and headers capable of impersonating an account, and discourages committing it even to private repositories.

Sources