# Aio Jira Aio Test Creation

> End-to-end workflow: read Jira tickets (Atlassian MCP), generate BDD/Gherkin test cases, create them in AIO Tests via API (Draft), link to Jira requirements, pick folders/cycles, naming conventions, QA lead review handoff. Use when the user provides a Jira URL and wants cases in AIO. Use proactively with the manual QA / AIO persona for ticket-driven test creation.

- Skill: `carolina1-po/aio-jira-aio-test-creation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add carolina1-po/aio-jira-aio-test-creation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/carolina1-po/aio-jira-aio-test-creation/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Carolina1-Po (https://skillmd.com/u/carolina1-po)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/carolina1-po/aio-jira-aio-test-creation

---


# 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:

1. Read ticket details (summary, description, acceptance criteria) — **Atlassian MCP** when available
2. Generate appropriate **Gherkin** scenarios (Given/When/Then)
3. Create cases in **AIO Tests** via the API (usually **Draft**)
4. **Link** cases to the Jira ticket as requirements
5. Place cases in the correct **AIO folder** (resolve `folderID` via 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)

1. [proofpilot.atlassian.net](https://proofpilot.atlassian.net) → any project → **AIO Tests**
2. Gear → **My Settings** → **API Token** → **Manage API Token** → **Generate API Token**
3. Copy immediately; store privately

## User prompt pattern

User may paste:

```text
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)

1. Fetch Jira issue details (MCP or user paste if MCP unavailable)
2. 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    |

3. Resolve **folder** — use user-specified folder name or select best match via `GET .../testcase/folder`; obtain `folderID`
4. Generate **Gherkin** covering happy path, **edge cases**, and **negative** paths (align with manual QA quality bar)
5. **Create** each case via `POST /project/{projectKey}/testcase` with **`"scriptType": {"ID": 2}`** for BDD/Gherkin, **`statusID`: 1** (Draft) unless told otherwise. Do **not** send `"scriptType": "BDD"` (string) — the API returns **400**.
6. **PUT** `.../testcase/{numericId}/detail` to add **BDD steps**, set **`folder`: `{"ID": folderID}`** (avoid leaving cases unfoldered in the UI), set **`jiraRequirementIDs`** to the Jira issue’s **numeric ID** (e.g. from Jira REST), and adjust **status** if needed.
7. 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:

1. Open case → **Edit**
2. Set status to **Under Review**
3. **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`   |

## Related links

- [AIO Process Document](https://proofpilot.atlassian.net/wiki/spaces/RM/pages/813039617/AIO+Process+Document)
- [QA Wolf Automation Process](https://proofpilot.atlassian.net/wiki/spaces/RM/pages/812613635/QA+Wolf+-+Automation+Process+Document)
- [AIO Tests REST API Docs](https://aiosupport.atlassian.net/wiki/spaces/AioTests/pages/2025619567/Rest+APIs)
- [AIO Tests Swagger](https://tcms.aiojiraapps.com/aio-tcms/aiotcms-static/api-docs/)

