Testing terms
The discipline that lets you change code without fear
Tests are the safety net that lets you refactor without fear and ship without dread. This category covers unit, integration, and end-to-end testing strategies, test doubles, coverage metrics, TDD and BDD approaches, and the tooling ecosystem across languages. A well-tested codebase is not slower to build — it is faster to evolve.
Test Doubles PHP 8.0+
Substitute objects used in tests to replace real dependencies — mocks, stubs, spies, fakes, and dummies each serve a different purpose.
1mo ago
testing intermediate
Test-Driven Development (TDD) PHP 7.0+
A development practice where tests are written before the code they test — Red (write a failing test), Green (write the minimum code to pass), Refactor (improve without breaking tests).
2mo ago
testing intermediate
Parameterised / Data-Driven Tests PHP 5.0+
Running the same test logic with multiple input/output pairs — PHPUnit's @dataProvider eliminates copy-pasted test methods for the same behaviour with different values.
2mo ago
testing intermediate
Test Coverage Types PHP 7.0+
Line coverage (lines executed), branch coverage (if/else paths), mutation testing (do tests detect actual bugs) — each measures a different aspect of test quality.
2mo ago
testing intermediate
Test Environment Parity
Dev, staging, and production must use identical PHP versions, MySQL versions, and OS configurations — divergence causes bugs that only appear in production.
2mo ago
testing intermediate
Visual Regression Testing
Automatically comparing screenshots of UI components or pages to a baseline — catching unintended visual changes that functional tests miss.
2mo ago
testing intermediate
Testing that the system meets business requirements from a user perspective — written in plain language (Gherkin) and automated with Behat in PHP.
2mo ago
testing intermediate
A development practice where tests are written in business-readable language (Given/When/Then) that domain experts, developers, and testers all understand.
2mo ago
testing intermediate
Testing complete user flows through a real browser against a running application — verifying that all layers work together from UI to database.
2mo ago
testing intermediate
Tests that pass and fail non-deterministically on the same code — caused by shared state, timing dependencies, external services, or random data.
2mo ago
testing intermediate
Tests that verify multiple components work correctly together — often involving real databases, HTTP clients, or third-party services.
2mo ago
testing intermediate
Testing system behaviour under expected and peak load conditions to identify performance bottlenecks and breaking points before they affect users.
2mo ago
testing intermediate
Guidelines for effective mocking: mock interfaces not classes, avoid over-mocking, prefer stubs for queries and mocks for commands.
2mo ago
testing intermediate
Snapshot Testing PHP 7.0+
A technique that captures the serialised output of a component or function on first run, then compares future runs against that snapshot — detecting unintended changes.
2mo ago
testing intermediate
Test Data Builders PHP 7.0+
A pattern for constructing test objects with sensible defaults that can be selectively overridden — reducing test setup noise and making the relevant data explicit.
2mo ago
testing intermediate
Test Fixtures & setUp() Best Practices
Managing test state with setUp()/tearDown(), object mothers, and factories — keeping tests isolated, readable, and fast.
2mo ago
testing intermediate
Test Isolation Strategies PHP 7.0+
Ensuring each test starts from a known clean state — using database transactions, in-memory fakes, or container resets so tests don't bleed state into each other.
2mo ago
testing intermediate
A development practice where tests are written before production code, driving design through the Red-Green-Refactor cycle.
2mo ago
testing intermediate