1---2name: quality-engineering-zephyr-test-generation-23description: 'Generate Zephyr test cases from Jira stories: parse acceptance criteria and business rules, impact-analyze existing TCs (update vs. create new), and draft correctly named test cases. Use for AC-to-test generation; defer post-generation Jira linking and manual test-case quality review.'4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/quality-engineering-zephyr-test-generation-26 triggers:7 files:8 - '**/user_story.md'9 keywords:10 - generate test cases11 - zephyr12 - impact analysis13 - create test case14---1516# Zephyr Test Generation Standards1718## **Priority: P1 (HIGH)**1920## Workflow: Jira → Zephyr21221. **Analyze Requirements**:23 - Extract: Summary, ACs, Platform per AC row, Market, Components.24 - Fetch Jira with `?expand=renderedFields` — HTML authoritative for platform colors:25 `#00B8D9` = Web · `#36B37E` = Mobile · `#FF991F` = Web+Mobile26 - See [Actor/Permission Matrix](../quality-engineering-business-analysis/references/analysis_patterns.md) for role/market logic.27 - HALT on ambiguous AC per `quality-engineering-test-plan-authoring` scenario expansion: ultra-short AC, no expected behavior, bundled ACs, contradiction. Ask before drafting.28292. **Impact Analysis** (run before any TC creation)30 - **Step — Direct Lookup**: Call `Get Issue Link Test Cases` with Jira issue key (e.g., `{PROJECT}-{ID}`).31 - **Step B — Supplemental**: If Step 0, search by `[Module]` and `[Screen]` keywords + check sibling issue links.32 - See [Discovery Protocol](references/impact_analysis.md) for full chain.33 - Map each AC to coverage status:34 - **Covered** → ask user: skip or update to current format?35 - **Partial** → always propose NEW TC.36 - **Not Covered** → always create NEW TC.37383. **Draft Artifact**:39 - Delete any existing `zephyr_test_plan.md` before writing.40 - Follow 4-section format in [TC Format Reference](references/tc_format.md) exactly.41 - After writing: read back file and print full content in chat so user can review without opening it.42 - Ask for: review approval, handling of Covered ACs, and Zephyr Folder ID.43444. **Create in Zephyr** (after explicit user approval)45 - `Create Test Case` (with `customFields` included — no separate Update needed) → `Create Test Case Steps` → `Create Test Case Issue Link`46 - For **updates** to existing TCs: fetch current steps via `Get Test Case Steps`, show before/after diff, wait for explicit approval, then `Update Test Case`.47 - Param contract per [SmartBear API Notes](references/smartbear-api.md).4849## Platform Rules5051| AC row | Action |52| ------------------------------------------- | --------------------------------------------------------------- |53| Single row `[ WEB + MOBILE ]` | ONE TC, Platform = "Web and Mobile", no platform prefix in name |54| Two rows same behavior, different platforms | TWO TCs with `Web_` / `Mobile_` prefix — never merge |5556## Naming & Filing5758- **Name**: Prefix `Web_` / `Mobile_` only when platform-exclusive; omit prefix for Web and Mobile.59- **Folder**: Use exact Folder ID provided by user or specified in Technical Impact.6061### Role Mapping Rule6263- **CRITICAL**: If Acceptance Criteria uses generic terms like "user", "buyer", or "customer" in ordering/checkout context, it MUST mapped to ALL purchasing roles: `["Client user", "Client admin", "Internal sales rep", "External sales rep"]`. not default to `Client user`.6465## Anti-Patterns6667- **No prefix omission**: TC name sent to Zephyr API must include `Web_` or `Mobile_` prefix for platform-exclusive TCs — copy verbatim from artifact draft; omit prefix only when Platform = "Web and Mobile".68- **No Draft skip**: Always set status = Draft; never automatically approve.69- **No flat folderId**: Use `"folder": {"id": X}` in all PUT payloads.70- **No WEB+MOBILE split**: One AC row = one TC with Platform "Web and Mobile".71- **No platform merge**: Two AC rows, different platforms = two separate TCs.72- **No silent update**: Show before/after diff; wait for explicit approval.73- **No lookup skip**: Always run Step direct link lookup before supplemental search.74- **No stale artifact**: Delete existing `zephyr_test_plan.md` before each run.75- **No coverage skip**: Coverage Analysis table must open every artifact.76- **No ghost update**: Update Zephyr TC whenever matching code changes.77- **No vague steps**: Use specific observable outcomes — e.g., `"System works"` → `"Banner 'Success' is visible"`.78- **No invented expected result**: cite the AC or business rule, or tag `ASSUMED` and surface it for review.79- **No rephrased negatives**: N and E scenarios must change a precondition or input, not the wording.80- **No generation on ambiguous AC**: HALT and ask; a convincing TC must not hide a missing requirement.8182## Coverage wording8384- During impact analysis, map each AC to Covered, Partial, or Not Covered and check for duplicate test cases before drafting new ones.