Cram Sheet208 words

Topic 3.2 — Testing strategy — cram sheet

Topic 3.2 — Testing strategy · cram sheet

Two gate boundaries

BoundaryMechanismSet by
Merge into a branchBranch policiesRepo admin
Deploy into an environmentApprovals and checksResource owner

A branch policy cannot gate a deployment; a check cannot gate a merge.

Test levels

LevelScope
LocalPre-commit
UnitOne component, dependencies faked
IntegrationComponents + real dependencies
LoadExpected and peak traffic
  • Defect cost: local (minutes) → PR (a build) → production (an incident).
  • A test needing a real database is an integration test, whatever the folder says.
  • Never blind-retry a flaky test — quarantine or fix.

Implementing tests

  • Task: PublishTestResults@2
  • Formats: JUnit · NUnit · VSTest · xUnit · CTest
  • condition: succeededOrFailed() — without it the publish step is skipped exactly when tests fail. The single most common defect in this objective.

Coverage

  • Task: PublishCodeCoverageResults@2
  • Formats: Cobertura · JaCoCo (≠ test result formats)
  • Coverage records lines executed, not whether anything was asserted.
  • Best gate: coverage of the changed lines.

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free