Testland
Browse all skills & agents

test-case-anatomy-reference

Pure-reference catalog of test-case anatomy - what fields a well-formed test case must have and what each field means. Enumerates the ISO/IEC/IEEE 29119-3:2021 test-case template fields (identifier, objective, preconditions, inputs, steps, expected results, postconditions, environment, traceability) and the ISTQB CTAL-TM specification-technique-driven additions (equivalence partition, boundary value, decision table, state transition). Maps the canonical anatomy to five tracker-specific schemas (TestRail, Xray, Zephyr Scale, Allure TestOps, Qase). Use as the authoritative source when authoring a case template, reviewing case quality, or migrating between tools.

Install with skills.sh (any agent)

npx skills add testland/qa --skill test-case-anatomy-reference
View source

test-case-anatomy-reference

Overview

A test case has nine required parts. Skipping any of them produces a case that's either ambiguous (a tester can't run it) or unverifiable (a reviewer can't tell if it passed). The canonical list comes from ISO/IEC/IEEE 29119-3:2021 §6, augmented by ISTQB CTAL-TM's specification-based-testing additions.

This skill is a pure reference consumed by traceability-matrix-builder and the five platform-specific case-management skills.

When to use

  • Authoring a case template for a new project.
  • Reviewing whether a draft case has all required fields.
  • Migrating cases between tools (TestRail → Xray; Zephyr → Qase) - need to map fields consistently.
  • Onboarding a tester to "what makes a case complete?"

How to use

  1. Start from the nine canonical fields table below - treat it as the checklist a well-formed case must satisfy.
  2. Fill each field concretely: name the exact identifier, one-sentence objective, verifiable preconditions, literal inputs, one action per step, a per-step expected result, postconditions, environment, and at least one traceability link.
  3. If the case came from a specification technique, attach the technique-specific metadata from the ISTQB additions table (partition, boundary value, rule vector, state / event / output).
  4. Map each canonical field to your tracker's real field name using references/tracker-schema-map.md, and set severity / priority / type from its cross-platform table.
  5. Check the field cardinality reference so one-to-many fields (steps, inputs, expected results, environment, traceability) are modelled as arrays, not blobs.
  6. Run the draft past the anti-patterns table; fix any match before the case is considered done.
  7. When migrating, author in the canonical anatomy first, then let the tracker mapping be additive so a later tool switch stays cheap.

The nine canonical fields (ISO 29119-3 §6)

Per ISO/IEC/IEEE 29119-3:2021 "Software and systems engineering - Software testing - Part 3: Test documentation" (cite by stable ID; full text behind iso.org paywall):

#FieldPurposeCommon mistakes
1IdentifierUnique ID for cross-reference, traceability, defect linking.Reusing IDs after deletion; non-stable IDs across migrations.
2ObjectiveOne-sentence statement of what's being verified.Vague ("test checkout"); should state behaviour ("verify discount applies before tax").
3PreconditionsSystem state required before the case runs.Implicit ("user is logged in"); should be executable / verifiable.
4InputsSpecific data values fed to the system.Generic ("a valid email"); should be concrete ("alice@example.com").
5StepsNumbered actions the tester performs.Combining actions ("login and add item"); should be one action per step.
6Expected resultsWhat the system should produce per step / overall.Missing per-step results; should pair each action with its expected outcome.
7PostconditionsSystem state after the case (cleanup expectations).Omitted; matters for shared environments.
8EnvironmentWhere the case is valid (browser, OS, build, locale).Universal-applicability assumption; should constrain explicitly.
9TraceabilityLinks to requirements, designs, defects.One-way link only (case → req); should be bidirectional.

ISTQB CTAL-TM specification-technique additions

Per the ISTQB Advanced Test Manager and Test Analyst syllabi, when a case is derived from a specification technique, it carries technique-specific metadata:

TechniqueAdditional fields
Equivalence partitioningPartition (valid/invalid), partition label, representative input
Boundary value analysisBoundary (min, max, on/off), the specific BVA value (-1, 0, 1, 99, 100, 101)
Decision tableRule ID, condition vector, action vector
State transitionStarting state, event, ending state, output
Use caseMain success scenario step, extension point
Classification treeTree node path

These fields don't replace the nine above - they're traceability to the design technique that produced the case. Per the ISTQB glossary (glossary.istqb.org (opens in new window)).

Tracker-schema map

Five common trackers (TestRail, Xray, Zephyr Scale, Allure TestOps, Qase) each store the canonical anatomy under different field names, plus their own severity / priority / type enums. The full per-tracker field map and the cross-platform severity / priority / type table live in references/tracker-schema-map.md. Consult it when migrating cases between tools or writing to a specific tracker's fields.

Field cardinality reference

A migration / template author must know which fields are one-to-one and which are one-to-many:

FieldCardinality
Identifier1
Objective1
Preconditions1 (free text) or n (linked sub-entities, Xray-style)
Stepsn (ordered)
Inputsn (per step)
Expected resultsn (one per step + optional overall)
Postconditions1
Environmentn (browser × OS × locale × build)
Traceabilityn (requirements, designs, defects)
Severity1
Priority1
Type1
Automation status1
Tagsn

Anti-patterns

Anti-patternWhy it failsFix
One step per caseCases proliferate; coverage harder to trackGroup related steps into one case with multiple ordered steps
Steps as a single text blobPer-step pass/fail tracking impossibleUse Steps template (TestRail) / steps array (everywhere else)
Implicit preconditions"User is logged in" - but as whom?State preconditions in verifiable terms
Generic inputs"Use a valid email" - tester picks one, results varySpecify concrete inputs
No traceability linksCase-to-requirement orphans; coverage reporting brokenAlways link to at least one requirement
Missing expected results per stepTester runs steps but can't tell what to assertPair every step with its expected outcome
Tracker-specific case structure mixed inMigration cost explodedAuthor cases in the canonical anatomy; let tracker mapping be additive
Reusing IDs after deletionHistory broken; defect links point to ghost casesIDs are immutable; deletion is soft

Worked example

A reviewer receives a draft case titled "test checkout" with a single free-text blob: "log in, add item, apply code SAVE10, pay, order confirmed." Walking it against the nine canonical fields:

  1. Identifier - none assigned; give it a stable ID (C1051).
  2. Objective - "test checkout" is vague; rewrite to "verify a 10% discount applies before tax at checkout."
  3. Preconditions - implicit "logged in"; make it verifiable: "user alice@example.com is authenticated with an empty cart."
  4. Inputs - generic "an item"; specify "SKU WIDGET-1, unit price 20.00, coupon SAVE10."
  5. Steps / Expected results - the blob combines four actions; split into ordered steps each paired with an expected result (add item -> cart shows 20.00; apply SAVE10 -> subtotal shows 18.00; pay -> confirmation page renders; overall -> order total taxes the discounted 18.00, not 20.00).
  6. Postconditions - add "cart is emptied; one order record created."
  7. Environment - unstated; constrain to "Chrome / build 4.2 / en-US."
  8. Traceability - orphaned; link to requirement REQ-DISCOUNT-3.

Mapping to TestRail via the tracker-schema map: objective -> title, preconditions -> custom_preconds, the step / expected pairs -> custom_steps_separated (Steps template), traceability -> refs. The blob is now a complete, runnable, verifiable case.

Limitations

  • Tracker reality varies. Custom-field discipline differs across orgs; this anatomy is the floor.
  • Specification-technique linkage is optional. Most teams don't carry the technique metadata; ISTQB-aligned orgs do.
  • Environment as a case-level field is imperfect. Some trackers (Xray, Zephyr) push environment to the run level - the case is environment-agnostic until executed.
  • Traceability is bidirectional in theory, often unidirectional in practice. Tools support bidirectional but discipline lapses.

References

  • ISO/IEC/IEEE 29119-3:2021 §6 "Test case specification" - cite by stable ID; canonical anatomy. Full text behind iso.org paywall.
  • ISTQB Advanced Test Manager (CTAL-TM) syllabus - specification-technique-driven case derivation.
  • ISTQB Glossary - glossary.istqb.org (opens in new window).
  • TestRail Cases API reference - support.testrail.com/hc/en-us/articles/7077871398036-Cases (Cloudflare-protected; cite by stable URL).
  • Xray Cloud REST API - docs.getxray.app/display/XRAYCLOUD/REST+API.
  • Zephyr Scale Cloud REST API v2 - smartbear.com/test-management/zephyr-scale.
  • Allure TestOps REST API - docs.qameta.io/allure-testops/integrations/rest-api/.
  • Qase Public API - developers.qase.io.
  • Sibling skills: traceability-matrix-builder, testrail-case-management, xray-case-management, zephyr-scale-case-management, allure-testops-case-management, qase-io-case-management.

Tracker-schema map

Five common trackers each store the canonical test-case anatomy under different field names. Use this map when migrating cases between tools or when a template author must know the exact per-tracker field to write to. Sources for each tracker's API are listed in the parent SKILL.md References section.

TestRail

Canonical fieldTestRail field
Identifierid (e.g., C1234)
Objectivetitle
Preconditionscustom_preconds
Inputs(within custom_steps_separated[].content)
Stepscustom_steps_separated (Steps template) or custom_steps (Text template)
Expected resultscustom_steps_separated[].expected
Postconditions(custom field if defined)
Environmentcustom_environment (custom field) or filter via refs
Traceabilityrefs (free text); template_id (Steps / Text / Exploratory)

TestRail templates (template_id): Steps (1) / Text (2) / Exploratory (3). The Steps template enforces step-level structure; Text is freeform; Exploratory is for SBTM-style charters.

Xray (Atlassian)

Xray stores tests as Jira issues with Test issue type. Steps live in a separate sub-entity.

Canonical fieldXray field
IdentifierJira key (e.g., ENG-123)
ObjectiveJira summary
PreconditionsLinked precondition (separate Jira issue type)
StepsTest steps section (per testType: Manual); for Cucumber, Gherkin section; for Generic, free-text
Expected resultsper-step expectedResult
EnvironmentTest execution testEnvironments (set per run)
TraceabilityJira issue links (Tests / TestedBy)

Xray testType: Manual / Cucumber / Generic. Determines how steps are stored.

Zephyr Scale (Smart Bear)

Canonical fieldZephyr field
Identifierkey (e.g., PROJ-T123)
Objectivename
Preconditionsprecondition
StepstestScript.steps[].description
Expected resultstestScript.steps[].expectedResult
EnvironmentConfigured per test cycle, not case
TraceabilityissueLinks (Jira issues)

Allure TestOps

Canonical fieldAllure TestOps field
Identifierid (numeric, e.g., 1234)
Objectivename
Preconditionsprecondition
Stepsscenario.steps (recursive - steps can have sub-steps)
Expected resultsWithin step expectedResult
Environmenttags (key=value pairs) + execution env
Traceabilityrelations (links to other cases / requirements)

Qase

Canonical fieldQase field
Identifierid (within project; full ID is PROJ-1234)
Objectivetitle
Preconditionspreconditions
Stepssteps[].action
Expected resultssteps[].expected_result
EnvironmentCustom fields
Traceabilitylinks field

Severity, priority, type (cross-platform)

All five trackers carry severity / priority / type fields. Each uses its own enum but they map similarly:

ConceptTestRailXrayZephyr ScaleAllure TestOpsQase
Prioritypriority_id (1-4)Jira priority fieldpriority enumCustompriority enum (low/med/high)
SeverityCustom fieldCustom fieldseverity enum (minor/normal/major/critical/blocker)severity (default labels)severity enum
Typetype_id (Functional, Performance, etc.)testType (Manual/Cucumber/Generic)testType (Manual/Automated)Customtype (functional/smoke/regression/etc.)
Automation statuscustom_automation_typeLinked to automation resultsautomation fieldTagsautomation (manual/automated/to-be-automated)

Related skills

allure-testops-case-management

Author and manage Allure TestOps test cases via the REST API - create cases, manage projects + suites, attach scenarios with nested steps, link to Jira / GitHub issues, sync with allure-results from CI runs. Covers Bearer-token auth, /api/rs/testcase CRUD endpoints, nested-step `scenario` shape, and the unique Allure TestOps feature of linking automated results back to manual case definitions. Use for pre-execution case authoring in teams using Allure TestOps as the canonical TCM.

qase-io-case-management

Author and manage Qase.io test cases via the Public API v1 - create cases, organise into suites, attach structured steps, link to Jira/Linear/GitHub, manage shared steps, and bulk-import via JSON. Covers Token header auth, /case/{project_code} CRUD endpoints, the steps array with action / expected_result / data shape, and shared-step reuse. Use for pre-execution case authoring in teams using Qase as a modern lightweight TCM.

test-case-review-rubric

Scores an already-written test case against six per-case quality axes (objective specificity, precondition executability, step granularity, step abstraction level, expected-result observability, traceability validity) and six set-level axes (partition coverage, boundary coverage, duplication, orphan and uncovered requirements, tier shape, identifier consistency). Derives a per-case PASS / WEAK / FAIL verdict and a set verdict from it without averaging, and marks every threshold as either standard-backed (ISTQB glossary, ISTQB CTFL v4.0, ISO/IEC/IEEE 29119-3:2021) or practitioner convention (step-count ceiling, tier bands, provenance threshold). Assumes the case field list and field cardinality are already defined by a test-case anatomy reference and judges content quality only. Use when reviewing a batch of hand-written test cases before promoting them to a release suite or handing them to an automation engineer.

testrail-case-management

Author and manage test cases in TestRail via REST API v2 - create cases, organise into suites + sections, update steps + expected results, bulk import from CSV/JSON, set automation status, link to references (Jira / requirements). Covers the Steps / Text / Exploratory templates, custom-field discovery (`get_case_fields`), and pagination on `get_cases`. Use for pre-execution case authoring and repository management. Do NOT use for submitting test-run results (pass/fail, status updates): posting results via add_results_for_cases is a separate post-execution concern.

traceability-matrix-builder

Build-an-X workflow that produces a requirements-to-tests traceability matrix from a TCM case repository + a requirements source (Jira / Linear / GitHub Issues). Walks the author through (1) extracting requirements with stable IDs, (2) extracting cases + their refs, (3) computing coverage (which requirements have at least one test, which tests verify which requirements, orphaned cases / orphaned requirements), (4) emitting a CSV / Markdown / HTML matrix, and (5) producing an executive summary (X% requirement coverage, Y orphans, Z over-tested). Use for test coverage audits, finding requirements-coverage gaps, sprint-end coverage reviews, compliance documentation, and traceability in regulated industries.

xray-case-management

Author and manage Xray test cases (Jira issues with Test issue type) via the GraphQL + REST APIs - create tests, attach steps, link preconditions, set testType (Manual / Cucumber / Generic), associate with requirements, bulk import via JSON. Covers OAuth client_id/client_secret auth, the GraphQL createTest mutation, the REST /api/v2/import/test/bulk endpoint, and the Cucumber-style scenario authoring path. Use for pre-execution case authoring in Jira-anchored teams using Xray. Distinct from Xray's test-execution / test-run features which post results.

zephyr-scale-case-management

Author and manage Zephyr Scale Cloud test cases via the REST API v2 - create tests, attach steps, link to Jira issues, organise into folders, manage test cycles. Covers Bearer-token auth, the /testcases endpoints, the testScript / steps shape, and folder hierarchy. Use for pre-execution case authoring in Jira-anchored teams using Zephyr Scale (formerly TM4J). Distinct from Zephyr's test-cycle / execution endpoints which post results.