Concept Category Core idea
TDD Workflow Write the failing test first; let it pull the implementation into existence
BDD Workflow Same as TDD but tests are phrased as behaviour specs readable by non-engineers
Regression testing Workflow Re-run tests to confirm a fixed bug stays fixed
Given-When-Then Syntax A sentence template for writing BDD scenarios
Unit testing Scope Test one function/module in isolation
Integration testing Scope Test multiple units working together, not in isolation
E2E testing Scope Drive the real UI through real user flows (Playwright, Cypress)
Stub Test double Replace a dependency with a fake that returns canned values
Mock Test double A stub that also asserts it was called in a specific way
Spy Test double Wraps the real implementation but records calls — observe without replacing
Fake Test double A working but simplified implementation (e.g. in-memory DB instead of real DB)
Test fixture Setup Shared, reusable setup data or state for a group of tests
Snapshot testing Assertion style Capture output once; future runs fail if it changes — common in UI
Property-based testing Input strategy Describe invariants; framework generates random inputs to break them
Mutation testing Confidence check Deliberately break your code; if tests don't catch it, the tests are weak
TAP Output protocol Standardised text format so any runner can talk to any harness
JUnit XML Output protocol XML format consumed by CI systems (GitHub Actions, Jenkins, GitLab)
CTRF Output protocol Newer JSON-based format, CI-agnostic

Lookup