1---2name: restassured-documentation-tdd3description: Legacy Rest Assured-specific alias for TDD-style case documentation. Prefer the standalone `test-artifact-export-skill` skill for formatting approved test cases or building export-ready artifacts, and use this only when Rest Assured-local conventions must be preserved explicitly.4---56# Document Test Cases In TDD78## 1. Store And Organize Files9101. Store TDD documents under `docs/tests/`.112. Mirror the automation or business-domain structure with feature folders such as `docs/tests/orders/` or `docs/tests/auth/`.123. Create one `.md` file per executable scenario, not one file per epic.134. Name files with a stable scenario purpose and classification such as `create-order-mss.md`, `create-order-optional-fields-ext.md`, or `create-order-missing-customer-err.md`.145. For non-trivial or high-risk requirements, document multiple scenarios:15 1. `MSS` for the main success path.16 2. `EXT` for valid variants such as optional fields or alternate filters.17 3. `ERR` for validation, auth, not-found, conflict, or drift behavior.186. For trivial low-risk reads, one `MSS` scenario is sufficient.197. Do not force redundant scenarios when the requirement has no meaningful variation.2021## 2. Use This Exact Case Structure22231. Write fields in this order:24 1. `title`25 2. `description`26 3. `test_suite`27 4. `Covered requirement`28 5. `preconditions`29 6. `steps`30 7. `execution_type`31 8. `design_status`32 9. `test_engineer`33 10. `test_level`34 11. `jira`35 12. `Test script`362. Keep `title` informative and unique. Include requirement or contract reference, scenario classification, and a concise behavior name.373. Keep `preconditions` as a lettered list: `A)`, `B)`, `C)`.384. Keep `steps` as a markdown table with columns `Step`, `Action`, and `Expected result`.395. Keep `execution_type` as `Automated` unless the user explicitly wants manual cases.406. Use `design_status` as `Draft`, `Ready`, or `Obsolete`.417. Keep `Test script` granular. Link to the exact Java test file and the specific test method or display name, not only the file.4243## 3. Make The Content API-Specific44451. Describe API behavior, not UI behavior.462. Put auth state, seeded data, feature flags, or contract version details in `preconditions`.473. In `steps`, describe the request action at a high level and put status, content type, headers, body semantics, and side effects in `Expected result`.484. Include contract paths, operation ids, requirement ids, or acceptance-criteria ids in `Covered requirement`.495. When runtime behavior differs from the documented contract, document the live executable expectation and reference the mismatch artifact separately.5051## 4. Start From The Template52531. Start from [tdd-case-template.md](assets/tdd-case-template.md) for new case files.542. Keep the field order unchanged so later sync and traceability work stays deterministic.553. Use aggregate index files under `docs/testing/tdd/` only as navigation aids when the repo wants them.5657## 5. Template5859```markdown60title: [ORD-POST-001] MSS: Create order with required fields61description: Validates successful order creation for the standard required-field payload.62test_suite: Orders63Covered requirement: US-123, POST /api/orders, operationId=createOrder64preconditions:65A) The API is running.66B) Authentication is configured for a valid user.67C) No conflicting order id is pre-seeded.68steps:69| Step | Action | Expected result |70|---|---|---|71| 1 | Send `POST /api/orders` with a valid required-field payload | Status `201` is returned with JSON content. |72| 2 | Inspect the response body | The response includes the created order id and submitted business fields. |73| 3 | Retrieve the new order through `GET /api/orders/{id}` | The order is persisted and matches the creation response. |74execution_type: Automated75design_status: Ready76test_engineer: Codex77test_level: 178jira: N/A79Test script: [OrderApiTest.java](C:/repo/tests/src/test/java/com/example/orders/OrderApiTest.java)#createOrderWithRequiredFields80```8182## 6. Scenario Depth Decision83841. Use `MSS`, `EXT`, and `ERR` for CRUD, authentication, validation-heavy, workflow, or integration-sensitive requirements.852. Use one `MSS` only for low-risk stable reads when optional data and error paths add little value.863. Add a dedicated drift or compatibility scenario when the live runtime contradicts the contract or requirement.8788## 7. Examples89901. Input: `Document POST /orders missing-customer-id as TDD.`91 Output: A dedicated `ERR` markdown case with lettered preconditions, a step table, and a direct link to the negative Rest Assured test method.922. Input: `Document the owner create flow as TDD.`93 Output: One `MSS` case for successful creation and separate `EXT` or `ERR` cases only when the requirement meaningfully varies.9495## 8. Troubleshooting96971. Problem: The automation file contains multiple test methods.98 Fix: Point `Test script` to the exact method anchor, not only the file.992. Problem: The case reads like a raw HTTP transcript.100 Fix: Keep the action concise and move the protocol details into the expected result only where they matter.1013. Problem: A single document mixes success, variation, and error behavior.102 Fix: Split it into separate scenario files and classify them as `MSS`, `EXT`, or `ERR`.