The Axiom

Test Automation

5 pages

Playwright

Playwright is the modern E2E choice over Selenium — role-based locators, built-in auto-wait, trace viewer, and the v1.56 Healer agent (75% success rate for broken selectors) that auto-PRs fixes; also ships an official MCP server for agent web browsing.

playwrighte2etestingbrowser-automation

pytest Patterns

Core pytest patterns for AI/LLM testing — fixtures with four scope levels, respx for HTTP mocking, pytest-mock for Python object mocking, asyncio_mode=auto for async tests, and markers for separating unit from integration tests that require real API keys.

pytesttestingfixturesparametrize

Selenium

Selenium is the W3C WebDriver standard for browser automation — prefer Playwright for new projects; use Selenium when maintaining legacy suites or requiring IE/Safari; explicit waits are mandatory, implicit waits interact badly with them.

seleniumwebdriverautomationtesting

Testcontainers

Testcontainers spins up real Docker containers (databases, queues, services) from test code, giving integration tests genuine infrastructure without mocks or shared environments.

testcontainersdockerintegration-testingjunit5

Testing LLM-Powered Applications

Test the plumbing, not the model — use respx to mock the Anthropic SDK's HTTP calls at zero cost, test RAG retrieval and prompt assembly independently, verify agent loop termination and max_steps enforcement, and never use a real API key in CI.

testingllmpytestmocking