Atomic ObjectJames McConkey7 min readintermediate
Write End-to-End Tests in Your Backend’s Language
Summary
This article advocates writing end-to-end tests in the backend's language to leverage domain models and persistence tools for efficient test data setup. It details a strategy for structuring E2E tests with inline data creation, small helpers, and parallel execution considerations.
- Write E2E tests in the backend's language (e.g., Python Playwright for FastAPI) to access domain models and persistence tools for data setup.
- Keep test data setup explicit and inline within the test for readability, avoiding overly abstract scenario builders.
- Build small, focused creation helpers for individual models, committing changes to make data immediately visible to the application.
- Design tests for parallel execution by using UUIDs for uniqueness, explicit ownership, and filtering queries by workspace/assignment.
Engineers building full-stack applications, especially those owning the backend, will find this useful for structuring robust, maintainable, and fast end-to-end tests.
7/10

