Use it when configuring, checking or troubleshooting Test in CI/CD.
Test
CI/CD Test stages execute automated checks against a defined revision, artifact or deployed target and should record exactly what behavior, scope and environment were evaluated.
1. Tests: unit, integration, end-to-end, security scans.
2. Fast tests first.
3. Publish reports.
4. Fix flaky tests.
5. Required for merge.
artefact/code → tests → reports → gate
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Healthy evidence: Test selection, artifact/revision under test, environment, fixtures, results, skipped cases and failure evidence are traceable.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: Flaky or quarantined tests are silently ignored, test selection changes by branch, or a rebuilt artifact is deployed instead of the tested artifact.
Step 3 Common mistakes Narrow the fault
- Tests skipped to get a green build.
Step 4 Where it fails Narrow the fault
Where Test usually goes wrong: test-case identity, fixture/environment, assertion scope, isolation, failure diagnostics and cleanup.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Tests passed ≠ software correct; coverage, fixture realism, environment parity, flaky-test handling and omitted paths define what the result does not prove.
- Pipeline status is execution evidence, not independent proof of target service health or business outcome.
- The exact revision, evaluated pipeline definition, effective inputs and execution worker are part of the evidence context.
- Preserve artifact identity and target read-back so validation, promotion and runtime acceptance cannot be silently conflated.
- Unit/integration test reports (JUnit XML) — results
- Coverage report — quality
- Flaky test tracking — reliability
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Tests passed ≠ software correct; coverage, fixture realism, environment parity, flaky-test handling and omitted paths define what the result does not show.
In depth
The test stage verifies that a change works before it reaches production. For infrastructure automation, testing ranges from fast static checks to full lab deployments.
| Level | Example | Speed |
|---|---|---|
| Static analysis | Linters, terraform validate, PSScriptAnalyzer | Seconds |
| Unit tests | pytest/Pester for functions, template rendering | Seconds |
| Policy tests | Conftest/OPA, Checkov | Seconds |
| Model-based | Batfish analysis of rendered configs | Minutes |
| Integration | Containerlab/CML lab, Molecule for Ansible roles | Minutes |
| Smoke tests | After deployment | Minutes |
Run fast checks on every commit and heavier tests on merge requests or nightly. Publish results in a standard format (JUnit XML) so failures are visible directly in the pipeline UI.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in CI/CD > Test. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Test CI/CD proof-boundary map
Fast trigger/execution/artifact/promotion/target-proof boundaries for Test.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Trigger / evaluation | Exact commit and evaluated pipeline/inputs are known | Wrong ref, inherited rule or hidden variable changes the run |
| Execution / validation | Expected worker, jobs and tests execute with traceable context | Skips, retries, stale cache or worker drift hides the failure |
| Artifact / promotion | Immutable artifact is linked to release, approval and environment | Rebuild/mutable tag breaks provenance or approval scope |
| Target proof | Rollout plus independent readiness/acceptance confirms the intended release | Pipeline/API success is treated as runtime health |
Deep reference
Healthy vs suspicious evidence
Output interpretation
For Test, rely on structured fields and stable IDs (test-case identity, fixture/environment, assertion scope, isolation, failure diagnostics and cleanup) rather than text formatted for display.