Creating AIO test cases from Jira with Cursor
Use this skill when the user wants AIO Tests cases generated from Jira tickets (typically Gherkin/BDD created via API).
Pair with aio-tests-api-connection for exact endpoints, auth, and project keys.
Purpose
From a Jira ticket link, the agent should:
- Read ticket details (summary, description, acceptance criteria) — Atlassian MCP when available
- Generate appropriate Gherkin scenarios (Given/When/Then)
- Create cases in AIO Tests via the API (usually Draft)
- Link cases to the Jira ticket as requirements
- Place cases in the correct AIO folder (resolve
folderIDvia folder tree API if unknown)
Prerequisites
- Cursor with agent chat available
- Atlassian MCP configured and authenticated when fetching Jira content
- AIO API token — user supplies
AioAuth <token>in chat or via env; never commit it - Optional: engine (or other) repo workspace if team rules live there — still follow this skill for API behavior
Token generation (reminder)
- proofpilot.atlassian.net → any project → AIO Tests
- Gear → My Settings → API Token → Manage API Token → Generate API Token
- Copy immediately; store privately
User prompt pattern
User may paste:
Create AIO test cases in Gherkin format for this ticket: https://proofpilot.atlassian.net/browse/LOKA-663
AIO token: AioAuth <their_token>
Security: Treat the token as secret; do not repeat it in full in summaries or files.
Execution flow (agent checklist)
Fetch Jira issue details (MCP or user paste if MCP unavailable)
Map ticket prefix → AIO project key:
Area Prefix AIO key DEV (main platform) DEV- DEV South (International Trial Finder) SOUTH- SOUTH Loka (enrollment & analytics) LOKA- LOKA Resolve folder — use user-specified folder name or select best match via
GET .../testcase/folder; obtainfolderIDGenerate Gherkin covering happy path, edge cases, and negative paths (align with manual QA quality bar)
Create each case via
POST /project/{projectKey}/testcasewith"scriptType": {"ID": 2}for BDD/Gherkin,statusID: 1 (Draft) unless told otherwise. Do not send"scriptType": "BDD"(string) — the API returns 400.PUT
.../testcase/{numericId}/detailto add BDD steps, setfolder:{"ID": folderID}(avoid leaving cases unfoldered in the UI), setjiraRequirementIDsto the Jira issue’s numeric ID (e.g. from Jira REST), and adjust status if needed.Reply with a summary table: AIO case keys, titles, folder, linked Jira key
BDD step shape (reference)
Match existing BDD cases in your project: each step is stepType + bddStep (text without the keyword prefix), e.g. BDD_GIVEN, BDD_WHEN, BDD_THEN, BDD_AND.
What each created case should include
- Title:
[Feature/Story Name] - [Specific Scenario](per team AIO process) - Format: BDD/Gherkin steps
- Status: Draft until QA lead review
- Folder: Correct
folderID(always set on detail so cases appear in the folder tree) - Jira: Linked as requirement to source ticket
- Coverage: Explicit preconditions in Gherkin where needed; no vague steps
After creation — human verification
- Jira: Ticket → AIO Tests section should list new cases (refresh if needed)
- AIO UI: Project → folder → confirm cases and steps
QA lead review (process)
Draft cases move to review in AIO:
- Open case → Edit
- Set status to Under Review
- Comments: tag QA lead per team norm
Prompt variations (examples)
- Focus: "…focusing on validation and error handling"
- Count: "Create 3 cases: happy path, edge, negative"
- Folder: "…place in the Language Identification and Translation folder"
- Cycle: "Add LOKA-TC-740 … LOKA-TC-744 to a new cycle LOKA-663 Validation"
- Update: "Add a THEN step to LOKA-TC-740 for event timestamp"
Troubleshooting
| Issue | Action |
|---|---|
| 401 from AIO | Regenerate token; check AioAuth prefix and header |
| 403 | Jira/AIO project permissions |
| Cases not on Jira card | Refresh; allow sync delay |
| Wrong folder | Move/update via API using correct folderID |
| Case “missing” in folder tree | Case may have folder: null — PUT detail with folder |