The only technique I’ve found for creating reliable end-to-end tests: 1
The only technique I’ve found for creating reliable end-to-end tests:
1. Run the app against a test db instance.
2. Recreate the db with a static dataset before each test run.
3. When testing edits/deletes, create data as part of the test.
The result? Atomic, reliable tests.
Listing 3 steps makes it sound easy. It’s not.
Especially since most apps call multiple APIs, supported by different teams, which ultimately call different databases.
In those cases, reliable end-to-end tests require:
1. Stable environments
2. Stable data
Both are rare.