Skip to content
academia.sh

Course Intermediate

Integration, Contract and End-to-End Testing

By the end of this course

Start course

01

Integration Tests

Choosing and paying for the boundary that runs for real: deciding which dependency runs with the real thing, managing the environment that brings dependent services up, preparing and masking production-like test data, putting migration and schema under test, and imitating an external service with record and replay approaches.

  1. 01 The Scope of Integration Testing Treating which dependency runs for real as a decision: running the same test against a fake and a real catalog, catching a schema mismatch only at the real boundary, and measuring the boundary's cost in queries per run.
  2. 02 Test Environment Management Bringing a dependent service up before the test: counting the setup and teardown steps, setting up a readiness probe as a step, catching the previous lesson's missed defect class at the real boundary, and showing why a process-lifetime-bound defect gets past it.
  3. 03 Test Data Management Measuring which property production-like test data has to preserve: a report defect caught by the distribution's tail rather than volume, the constraint, distribution, and relationship properties masking breaks, and the defect class the masked value destroys.
  4. 04 Database Testing Putting migration steps and the schema under test: verifying the shape the up migration produces, migration-number uniqueness, catching data loss in the down migration, a migration failing on existing data with a constraint violation, and the backfill value a schema test cannot see.
  5. 05 Mocking External Services Imitating another team's service with record and replay: a run fed from the recording working without a process or a network call, request drift being caught when it finds no match in the cassette, and the response the recording freezes staying green when the contract changes.

02

Contract and API Tests

Checking one by one that both sides honor the same contract: verifying the request and response with a schema check, carrying the consumer's expectation to the provider, catching a breaking change before publication, and the deviation risk a mock server carries while it makes parallel development possible.

  1. 01 API Testing Checking a live service's response against a schema: catching with a real request the field change a frozen recording cannot see, separating structural mismatch from semantic mismatch, and measuring the check's cost by the fields checked, the requests sent, and the share of time.
  2. 02 Consumer-Driven Contract Testing Gathering the expectation from the consumer's running code and carrying it to the provider's team: recording the fields read during the run, the generated contract catching a breaking change on the provider's side, and measuring how a branch that never ran stays outside the contract's coverage.
  3. 03 Schema Compatibility Checking A check that compares two schema versions and stops a breaking change before publication: change types falling into separate compatibility classes for the request and response directions, the expand–contract sequence turning the gate green, and a value-set widening the check counts as compatible breaking the consumer.
  4. 04 Developing With Mock Servers Counting the points where a mock server that lets development continue without a ready provider deviates from reality: sending the same set of requests to two servers, measuring the deviation the contract run closes, and showing that a deviation tied to state across requests cannot be closed by any contract.

03

End-to-End and Interface Tests

Balancing the cost and value of tests that run over the whole application: establishing the cross-level distribution with the pyramid, the effect of selector strategy and wait management on flakiness, device and emulator decisions, the benefit and noise of screen comparison, managing flakiness by cause with quarantine and repair discipline, and the trade-off parallelizing the run sets between duration and isolation.

  1. 01 The Test Pyramid Running the same borrowing flow at the unit, integration, and end-to-end levels; showing the defect class each level catches and misses; and measuring the cost per level with query, request, and setup counts.
  2. 02 Browser Automation Measuring the two decisions a page-driving test makes — selector choice and wait policy; the resilience of four selector types against structural change, and the drop rate and wait cost of sleep, implicit wait, and explicit wait.
  3. 03 Mobile Automation Measuring the run matrix that grows with the product of the device and version axes; comparing the share covered and the defect classes caught by subsets selected by user share and by coverage; and the limit of the dimension an emulator carries.
  4. 04 Visual Verification A pixel comparison of the screenshot against the baseline image; measuring false-alarm and miss rates by scanning the threshold; the effect of excluding a variable region from the comparison; and the defect class visual verification cannot see.
  5. 05 Flakiness Management Measuring flakiness's distribution across causes at the scale of an end-to-end team; how individually small drop rates compound at team scale; and the trade-off the quarantine threshold sets between red runs and escaped real defects.
  6. 06 Parallel Execution Measuring the time gained and the isolation lost by splitting an end-to-end team into workers; the ceiling the serial share puts on speedup, the collisions a shared fixture produces, the race defect visible only in parallel, and isolation's cost and blind spot alike.

Start typing to search.

↑↓ Esc navigate · open · close