home / skills / hoangnguyen0403 / agent-skills-standard / zephyr-test-generation

This skill automates Zephyr test case generation from requirements by analyzing impact, drafting or updating TCs, and ensuring traceability.

npx playbooks add skill hoangnguyen0403/agent-skills-standard --skill zephyr-test-generation

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.3 KB
---
name: Zephyr Test Generation
description: Workflow for generating or updating Zephyr Scale Test Cases from requirements.
metadata:
  labels: [zephyr, test-generation, jira, regression-analysis]
  triggers:
    files: ['**/*.feature', '**/user_story.md']
    keywords:
      [generate test cases, update zephyr, jira validation, impact analysis]
---

# Zephyr Test Generation Standards

## **Priority: P1 (HIGH)**

## Workflow: Jira → Zephyr

1.  **Analyze Requirements**:
    - Identify AC and verify [Actor/Permission Matrix](../business-analysis/references/analysis_patterns.md).
    - **Identify Platform**: Detect if requirement applies to `Web`, `Mobile`, or `Both`.
    - **Identify Market**: Extract Market context (e.g., `VN`, `MY`, `All`).
    - Use [Business Analysis](../business-analysis/SKILL.md) for logic investigation.
2.  **Impact Analysis**:
    - Search Zephyr for existing TCs related to the feature.
    - Perform [Impact Study](references/impact_analysis.md) to decide: **Update** or **New**.
3.  **Draft/Merge TCs**:
    - For **New**: Create following [Naming Convention](../quality-assurance/SKILL.md).
    - For **Traceability**: Call `create_test_case_issue_link` immediately after creation.
    - For **Update**: Fetch steps and apply deltas.
4.  **Review**: Ensure no "OR" logic and steps are atomic.

## Output Structure

- Refer to [Zephyr JSON Schema](references/zephyr_schema.json) for creation/updates.

## Metadata & Traceability Standards

1. **Preconditions**: Must be extracted from the requirement as a list of bullet points.
2. **Custom Fields**: Populate `Roles` (multi-select) and `Platform` exactly as shown in requirements.
3. **Traceability (CRITICAL)**: Always link the TC to the Jira Issue (e.g., `EZRX-39448`) using the `create_test_case_issue_link` tool.
4. **Naming**: Prefix with `[Platform]` ONLY if exclusive to one platform. Use the `[Module]_[Action]...` pattern. Omit platform if it supports **Both**.
5. **Filing**: Use the exact Folder Path specified in the Technical Impact or module standards.

## Anti-Patterns

- **Ghost Updates**: Changing code without updating the corresponding Zephyr TC.
- **Duplicate Creation**: Creating a new TC for a logic shift when an update was more appropriate.
- **Vague Steps**: `System works` -> `Expect Result: Banner 'Success' is visible`.

Overview

This skill automates generation and updating of Zephyr Scale Test Cases from Jira requirements. It enforces naming, metadata, and traceability standards so test cases are consistent, reviewable, and linked back to the source Jira issue. The workflow covers requirement analysis, impact study, drafting/updating cases, and review.

How this skill works

The skill parses Jira requirements to extract acceptance criteria, actors/roles, platform, and market context. It searches Zephyr for existing test cases to decide whether to update or create new ones, generates Zephyr-compliant JSON using the schema, populates custom fields, and calls the create_test_case_issue_link tool to ensure Jira traceability. It also enforces atomic steps and naming conventions and returns diffs for review when updating.

When to use it

  • Creating Zephyr test cases for new features described in Jira.
  • Updating existing Zephyr test cases after requirement changes or implementation shifts.
  • Running impact analysis to avoid duplicate test cases or ghost updates.
  • Generating test case drafts for reviewers to validate steps and preconditions.
  • Standardizing test artifacts across platforms and markets.

Best practices

  • Always extract preconditions as a bulleted list directly from the requirement.
  • Populate Roles (multi-select) and Platform exactly as specified in the requirement.
  • Perform an impact analysis in Zephyr before creating new TCs to prevent duplicates.
  • Prefix names with [Platform] only if the TC is exclusive to a single platform; omit platform for multi-platform cases.
  • Link each test case to the Jira issue immediately using create_test_case_issue_link for traceability.
  • Write atomic, unambiguous steps and avoid OR-logic in step descriptions.

Example use cases

  • Requirement tags it applies to Android only: generate a new [Android]_[Module]_[Action] TC and set Platform to Android.
  • A Jira ticket modifies acceptance criteria: perform impact analysis, update matching Zephyr TC steps, and attach a delta summary.
  • Feature applies to both Web and Mobile: create a platform-agnostic TC name and populate Platforms as "Both" or list both values.
  • Bulk migration: parse multiple Jira stories and create or update Zephyr test cases while preserving folder path and metadata.
  • Reviewer workflow: produce TC JSON and a short diff to guide QA reviewers during a manual review.

FAQ

How do I decide between Update and New when similar TCs exist?

Run an impact analysis: if the existing TC covers the same actor/permission and only needs step or data changes, update it; if the behavior or acceptance criteria have materially shifted, create a new TC.

What must I include for traceability?

Always call create_test_case_issue_link to link the TC to the Jira issue (e.g., EZRX-39448). Include the Jira ID in the TC metadata and use the exact folder path specified by the technical impact.