A test fixture is the starting state a test needs, such as an account, data, or a server connection. Consistent prerequisites make results reproducible.
The demo creates a record during setup and removes it during cleanup. Isolate fixtures between tests to avoid order-dependent results.
When to use
Use it when tests need database records, browser sessions, or other setup and cleanup.