Test Artifact Export Skill
Author: jovd83 | Version: 1.1.1
Render existing test-case content into a requested destination format. This skill is for formatting and export, not for test design, coverage generation, or requirements analysis.
Scope
Use this skill only when the underlying test logic is already known through one of these inputs:
- approved test cases
- existing TDD, BDD, or plain-text test descriptions
- manually curated scenario lists
- framework-specific narrative test documentation
- normalized scenario data prepared by another skill or workflow
Do not use this skill to:
- choose a black-box test technique
- generate new coverage from requirements
- invent missing business rules, steps, or expected outcomes
- reverse-engineer unsupported vendor schemas from the web
If the user needs test design first, route them to the relevant test-design or test-planning skill before formatting.
Dispatcher Integration
Use skill-dispatcher as the primary entrypoint when another skill needs export or formatting help from this skill.
- Accept dispatcher-led handoffs for intents such as
render_test_artifact, export_test_cases, or format_test_cases.
- Consume normalized scenario data when available instead of re-deriving business intent from prose.
- Keep this skill focused on rendering and export. Do not take over technique selection or coverage planning just because the input is thin.
- Treat direct repo paths to this skill as a compatibility fallback rather than the preferred integration pattern.
Read In This Order
./references/formatter-guide.md
./references/normalized-test-case-model.md
./references/destination-field-matrix.md
./references/formatting-guidelines.md
- Read the destination-specific template or reference only for the chosen output:
./assets/templates/test-case.j2
./assets/templates/tdd-summary-table.j2
./assets/templates/plain-text-list.j2
./assets/templates/bdd-feature.j2
./assets/templates/xray-gherkin.feature.j2
./assets/templates/zephyr-scale.csv.j2
./references/xray-gherkin-import.md
./references/testlink-import-file-formats.pdf
Supported Destinations
Human-review outputs
- detailed markdown test case
- TDD-style markdown test case
- markdown summary table
- plain-text scenario notes
- BDD/Gherkin feature text
Tool-oriented outputs
- Xray-compatible
.feature files
- Xray-compatible zipped feature bundles when the workflow explicitly needs a zip
- Zephyr Scale CSV
- TestLink-oriented mapping output based on the bundled reference
- TestRail-oriented mapping output when the target fields are known
Runtime Inputs
Capture these signals when present:
- target destination
- source artifact type
- scenario grouping such as feature, suite, folder, section, or component
- traceability IDs such as story, requirement, ticket, or test IDs
- metadata such as priority, labels, status, execution type, or owner
- whether the user wants artifact-only output or a mapping preview first
- whether the user needs one file, many files, or a zipped bundle
If the destination is ambiguous but low-risk, infer the most likely format and state the assumption. If the destination changes required fields or the output contract materially, pause for one focused clarification.
Normalized Working Model
Normalize the source artifact into the minimal stable structure described in ./references/normalized-test-case-model.md.
At minimum, try to extract:
- scenario identifier
- title
- objective or behavior
- preconditions
- ordered steps or Given/When/Then flow
- expected result or observable outcome
- traceability references
- destination-specific metadata if already known
Do not persist this runtime normalization automatically.
Memory Model
- Runtime memory: use a temporary normalized case model and missing-field checklist for the current task only.
- Project-local persistent memory: create files only when the user asked for durable artifacts such as exported feature files, CSVs, or markdown case documents in their repo.
- Shared memory: out of scope. If cross-project reuse is needed, integrate an external shared-memory skill instead of storing reusable knowledge in this skill implicitly.
Do not automatically promote runtime notes into project-local or shared memory.
Execution Workflow
1. Classify the Request
- Confirm that the user already has test logic.
- Identify the destination format.
- Determine whether the output is human-review, import-ready, or a mapping preview.
2. Normalize the Source
- Convert the source into the normalized working model.
- Preserve only fields that are actually present.
- Keep source facts separate from inferred structure.
3. Check Destination Requirements
- Use
./references/destination-field-matrix.md.
- Build a short missing-field list only for fields that are required by the chosen destination.
- Ask for missing required fields instead of inventing them.
4. Render the Artifact
- Use the destination-specific template or reference contract.
- Preserve traceability when it exists.
- Keep import-ready outputs free of analysis commentary.
5. Validate When Possible
- Use
python ./scripts/format-validator.py markdown <path> for detailed markdown or TDD-style markdown that uses the bundled structure.
- Use
python ./scripts/format-validator.py summary <path> for summary-table markdown.
- Use
python ./scripts/format-validator.py plain_text <path> for lightweight plain-text artifacts.
- Use
python ./scripts/format-validator.py bdd <path> for generic Gherkin.
- Use
python ./scripts/format-validator.py xray <path> for Xray .feature files or zipped feature bundles.
- Use
python ./scripts/format-validator.py zephyr <path> for Zephyr Scale CSV.
If a destination has no deterministic validator in this repo, say that clearly and validate the source-to-destination field mapping manually instead of pretending stronger verification than exists.
6. Return the Right Final Shape
- For import-ready destinations, return only the artifact unless a missing-field or ambiguity block remains.
- For mapping previews, return the field mapping plus unresolved gaps.
- For human-review outputs, optimize for readability and stable identifiers.
Destination Rules
Detailed Markdown Or TDD
- Use
test-case.j2.
- Keep one scenario per canonical case artifact unless the user explicitly asks for a summary-only deliverable.
- Use the step table with
Step | Action | Expected Result.
Summary Markdown
- Use
tdd-summary-table.j2.
- Keep the summary compact and stable across revisions.
Plain Text
- Use
plain-text-list.j2 only for lightweight review output.
- Keep each row readable and decision-oriented rather than verbose prose.
BDD / Gherkin
- Use
bdd-feature.j2.
- Keep each scenario focused on one observable behavior.
- Add tags only when they add real traceability or execution meaning.
Xray
- Stay inside
.feature file import support described in ./references/xray-gherkin-import.md.
- Use
xray-gherkin.feature.j2.
- Package zipped bundles only when the surrounding workflow explicitly requires a zip.
- Do not invent unsupported Xray JSON schemas.
Zephyr Scale
- Use
zephyr-scale.csv.j2.
- Do not render the CSV until all required columns are known.
- Repeat parent case metadata only as required by the CSV contract.
TestLink / TestRail
- Prefer a mapping-first workflow when the import shape is ambiguous.
- Stay within fields supported by the source artifact and bundled references.
- If the user requests a concrete import payload but the destination contract is incomplete or ambiguous in this repo, say so plainly and return the mapping plan instead of fabricating a schema.
Failure And Escalation Rules
- If the source artifact is incomplete for the requested destination, ask only for the missing required fields.
- If the source mixes designed and undesigned scenarios, format only the designed subset and call out the blocked items.
- If the user requests an unsupported tool or schema, say it is unsupported in the current implementation.
- If multiple output destinations are requested, complete them one at a time from the same normalized model.
Researching New Destinations
If the user asks for a new output format that this repository does not yet support:
- Confirm that the task is to extend the skill, not merely to describe the format.
- Research the destination using primary or official sources only.
- Capture the contract locally before claiming support:
- add or update a reference under
./references/
- extend
./references/destination-field-matrix.md
- add templates or static assets under
./assets/templates/ when rendering is deterministic
- add or extend validator logic only when local deterministic checks are feasible
- add source and expected examples under
./examples/
- add or extend automated tests under
./tests/
- State what was verified, what remains ambiguous, and whether the new destination is artifact-ready or mapping-only.
Use ./references/new-destination-research-workflow.md and ./scripts/scaffold-new-destination.py to keep this expansion path structured and auditable.
Gotchas
- Xray Destination Overwrites: Importing feature files into Xray without existing Test issue keys will create new Test issues. If you import them into a project where the same scenarios (by title or path) already exist but keys aren't provided in the feature file tags, you may end up with duplicates instead of updates.
- Zephyr Scale CSV Header Sensitivity: The Zephyr Scale CSV importer is highly sensitive to column headers. Do not rename columns in the generated CSV or the import will fail silently or with ambiguous errors.
- TestRail Template Matching: Ensure the exported CSV structure matches the TestRail template type (e.g., Test Case (Text) vs. Test Case (Steps)) you intend to select during import. Mapping a multi-step format to a single-text template will lead to truncated or poorly formatted steps.
- BDD/Gherkin Step Variance: If the source artifact uses slightly different phrasing for the same step across multiple scenarios, the exporter will preserve that variance. This can lead to fragmented step libraries in tools like Xray Cloud. Normalize steps in the source before exporting if you want them to be reusable.
- Character Encoding: Ensure that your environment supports UTF-8 when generating CSV or feature files. Special characters (like smart quotes or non-ASCII symbols) in the source artifact might be mangled if the file is saved with a different encoding (e.g., Windows-1252), leading to import failures in TestRail or Xray.
- Traceability ID Formatting: Many tools (like Jira-based Xray/Zephyr) require traceability IDs to match a specific regex (e.g.,
PROJ-123). If the source artifact contains malformed IDs, the export will still happen, but the link will fail in the destination tool.
- Batch Limits: Large exports (e.g., >1000 scenarios in one CSV or a massive zip bundle) might hit destination tool API or UI upload limits. Break large test suites into smaller logical chunks before exporting.
- Silent Failures in Mapping: If a required field for a destination is missing in the source, this skill will ask for it. However, if you provide a placeholder, the destination tool might accept the import but ignore the data if it doesn't match the tool's internal validation rules (e.g., priority "High" vs "P1").
Guardrails
- Do not redesign coverage.
- Do not add missing business logic.
- Do not silently assign invented metadata.
- Do not mix analysis commentary into import-ready artifacts.
- Do not claim a destination is validated when the repo only supports heuristic checks.
- Do not turn runtime normalization into persistent skill memory.
- Do not claim support for a newly researched destination until the repo contains the necessary references, examples, and tests.
Extensibility Hooks
- Add new destinations by extending
./references/destination-field-matrix.md, adding or updating the relevant template or reference contract, and teaching ./scripts/format-validator.py only when deterministic validation is feasible.
- Keep destination-specific behavior in references and templates, not bloated into this file.
- Preserve backward compatibility for existing destination names unless there is a clear migration reason.
1---2name: test-artifact-export-skill3description: Format already-designed test cases or artifacts into review-ready markdown, TDD case specs, scenario notes, BDD/Gherkin features, Xray Gherkin bundles, Zephyr Scale CSV, TestLink, or TestRail mappings. Use when test logic exists and Codex must normalize and render it for review or import.4---56# Test Artifact Export Skill78> **Author:** jovd83 | **Version:** 1.1.191011Render existing test-case content into a requested destination format. This skill is for formatting and export, not for test design, coverage generation, or requirements analysis.1213## Scope1415Use this skill only when the underlying test logic is already known through one of these inputs:1617- approved test cases18- existing TDD, BDD, or plain-text test descriptions19- manually curated scenario lists20- framework-specific narrative test documentation21- normalized scenario data prepared by another skill or workflow2223Do not use this skill to:2425- choose a black-box test technique26- generate new coverage from requirements27- invent missing business rules, steps, or expected outcomes28- reverse-engineer unsupported vendor schemas from the web2930If the user needs test design first, route them to the relevant test-design or test-planning skill before formatting.3132## Dispatcher Integration3334Use `skill-dispatcher` as the primary entrypoint when another skill needs export or formatting help from this skill.3536- Accept dispatcher-led handoffs for intents such as `render_test_artifact`, `export_test_cases`, or `format_test_cases`.37- Consume normalized scenario data when available instead of re-deriving business intent from prose.38- Keep this skill focused on rendering and export. Do not take over technique selection or coverage planning just because the input is thin.39- Treat direct repo paths to this skill as a compatibility fallback rather than the preferred integration pattern.4041## Read In This Order42431. `./references/formatter-guide.md`442. `./references/normalized-test-case-model.md`453. `./references/destination-field-matrix.md`464. `./references/formatting-guidelines.md`475. Read the destination-specific template or reference only for the chosen output:48 - `./assets/templates/test-case.j2`49 - `./assets/templates/tdd-summary-table.j2`50 - `./assets/templates/plain-text-list.j2`51 - `./assets/templates/bdd-feature.j2`52 - `./assets/templates/xray-gherkin.feature.j2`53 - `./assets/templates/zephyr-scale.csv.j2`54 - `./references/xray-gherkin-import.md`55 - `./references/testlink-import-file-formats.pdf`5657## Supported Destinations5859### Human-review outputs6061- detailed markdown test case62- TDD-style markdown test case63- markdown summary table64- plain-text scenario notes65- BDD/Gherkin feature text6667### Tool-oriented outputs6869- Xray-compatible `.feature` files70- Xray-compatible zipped feature bundles when the workflow explicitly needs a zip71- Zephyr Scale CSV72- TestLink-oriented mapping output based on the bundled reference73- TestRail-oriented mapping output when the target fields are known7475## Runtime Inputs7677Capture these signals when present:7879- target destination80- source artifact type81- scenario grouping such as feature, suite, folder, section, or component82- traceability IDs such as story, requirement, ticket, or test IDs83- metadata such as priority, labels, status, execution type, or owner84- whether the user wants artifact-only output or a mapping preview first85- whether the user needs one file, many files, or a zipped bundle8687If the destination is ambiguous but low-risk, infer the most likely format and state the assumption. If the destination changes required fields or the output contract materially, pause for one focused clarification.8889## Normalized Working Model9091Normalize the source artifact into the minimal stable structure described in `./references/normalized-test-case-model.md`.9293At minimum, try to extract:9495- scenario identifier96- title97- objective or behavior98- preconditions99- ordered steps or Given/When/Then flow100- expected result or observable outcome101- traceability references102- destination-specific metadata if already known103104Do not persist this runtime normalization automatically.105106## Memory Model107108- Runtime memory: use a temporary normalized case model and missing-field checklist for the current task only.109- Project-local persistent memory: create files only when the user asked for durable artifacts such as exported feature files, CSVs, or markdown case documents in their repo.110- Shared memory: out of scope. If cross-project reuse is needed, integrate an external shared-memory skill instead of storing reusable knowledge in this skill implicitly.111112Do not automatically promote runtime notes into project-local or shared memory.113114## Execution Workflow115116### 1. Classify the Request117118- Confirm that the user already has test logic.119- Identify the destination format.120- Determine whether the output is human-review, import-ready, or a mapping preview.121122### 2. Normalize the Source123124- Convert the source into the normalized working model.125- Preserve only fields that are actually present.126- Keep source facts separate from inferred structure.127128### 3. Check Destination Requirements129130- Use `./references/destination-field-matrix.md`.131- Build a short missing-field list only for fields that are required by the chosen destination.132- Ask for missing required fields instead of inventing them.133134### 4. Render the Artifact135136- Use the destination-specific template or reference contract.137- Preserve traceability when it exists.138- Keep import-ready outputs free of analysis commentary.139140### 5. Validate When Possible141142- Use `python ./scripts/format-validator.py markdown <path>` for detailed markdown or TDD-style markdown that uses the bundled structure.143- Use `python ./scripts/format-validator.py summary <path>` for summary-table markdown.144- Use `python ./scripts/format-validator.py plain_text <path>` for lightweight plain-text artifacts.145- Use `python ./scripts/format-validator.py bdd <path>` for generic Gherkin.146- Use `python ./scripts/format-validator.py xray <path>` for Xray `.feature` files or zipped feature bundles.147- Use `python ./scripts/format-validator.py zephyr <path>` for Zephyr Scale CSV.148149If a destination has no deterministic validator in this repo, say that clearly and validate the source-to-destination field mapping manually instead of pretending stronger verification than exists.150151### 6. Return the Right Final Shape152153- For import-ready destinations, return only the artifact unless a missing-field or ambiguity block remains.154- For mapping previews, return the field mapping plus unresolved gaps.155- For human-review outputs, optimize for readability and stable identifiers.156157## Destination Rules158159### Detailed Markdown Or TDD160161- Use `test-case.j2`.162- Keep one scenario per canonical case artifact unless the user explicitly asks for a summary-only deliverable.163- Use the step table with `Step | Action | Expected Result`.164165### Summary Markdown166167- Use `tdd-summary-table.j2`.168- Keep the summary compact and stable across revisions.169170### Plain Text171172- Use `plain-text-list.j2` only for lightweight review output.173- Keep each row readable and decision-oriented rather than verbose prose.174175### BDD / Gherkin176177- Use `bdd-feature.j2`.178- Keep each scenario focused on one observable behavior.179- Add tags only when they add real traceability or execution meaning.180181### Xray182183- Stay inside `.feature` file import support described in `./references/xray-gherkin-import.md`.184- Use `xray-gherkin.feature.j2`.185- Package zipped bundles only when the surrounding workflow explicitly requires a zip.186- Do not invent unsupported Xray JSON schemas.187188### Zephyr Scale189190- Use `zephyr-scale.csv.j2`.191- Do not render the CSV until all required columns are known.192- Repeat parent case metadata only as required by the CSV contract.193194### TestLink / TestRail195196- Prefer a mapping-first workflow when the import shape is ambiguous.197- Stay within fields supported by the source artifact and bundled references.198- If the user requests a concrete import payload but the destination contract is incomplete or ambiguous in this repo, say so plainly and return the mapping plan instead of fabricating a schema.199200## Failure And Escalation Rules201202- If the source artifact is incomplete for the requested destination, ask only for the missing required fields.203- If the source mixes designed and undesigned scenarios, format only the designed subset and call out the blocked items.204- If the user requests an unsupported tool or schema, say it is unsupported in the current implementation.205- If multiple output destinations are requested, complete them one at a time from the same normalized model.206207## Researching New Destinations208209If the user asks for a new output format that this repository does not yet support:2102111. Confirm that the task is to extend the skill, not merely to describe the format.2122. Research the destination using primary or official sources only.2133. Capture the contract locally before claiming support:214 - add or update a reference under `./references/`215 - extend `./references/destination-field-matrix.md`216 - add templates or static assets under `./assets/templates/` when rendering is deterministic217 - add or extend validator logic only when local deterministic checks are feasible218 - add source and expected examples under `./examples/`219 - add or extend automated tests under `./tests/`2204. State what was verified, what remains ambiguous, and whether the new destination is artifact-ready or mapping-only.221222Use `./references/new-destination-research-workflow.md` and `./scripts/scaffold-new-destination.py` to keep this expansion path structured and auditable.223224## Gotchas225226- **Xray Destination Overwrites**: Importing feature files into Xray without existing Test issue keys will create new Test issues. If you import them into a project where the same scenarios (by title or path) already exist but keys aren't provided in the feature file tags, you may end up with duplicates instead of updates.227- **Zephyr Scale CSV Header Sensitivity**: The Zephyr Scale CSV importer is highly sensitive to column headers. Do not rename columns in the generated CSV or the import will fail silently or with ambiguous errors.228- **TestRail Template Matching**: Ensure the exported CSV structure matches the TestRail template type (e.g., *Test Case (Text)* vs. *Test Case (Steps)*) you intend to select during import. Mapping a multi-step format to a single-text template will lead to truncated or poorly formatted steps.229- **BDD/Gherkin Step Variance**: If the source artifact uses slightly different phrasing for the same step across multiple scenarios, the exporter will preserve that variance. This can lead to fragmented step libraries in tools like Xray Cloud. Normalize steps in the source before exporting if you want them to be reusable.230- **Character Encoding**: Ensure that your environment supports UTF-8 when generating CSV or feature files. Special characters (like smart quotes or non-ASCII symbols) in the source artifact might be mangled if the file is saved with a different encoding (e.g., Windows-1252), leading to import failures in TestRail or Xray.231- **Traceability ID Formatting**: Many tools (like Jira-based Xray/Zephyr) require traceability IDs to match a specific regex (e.g., `PROJ-123`). If the source artifact contains malformed IDs, the export will still happen, but the link will fail in the destination tool.232- **Batch Limits**: Large exports (e.g., >1000 scenarios in one CSV or a massive zip bundle) might hit destination tool API or UI upload limits. Break large test suites into smaller logical chunks before exporting.233- **Silent Failures in Mapping**: If a required field for a destination is missing in the source, this skill will ask for it. However, if you provide a placeholder, the destination tool might accept the import but ignore the data if it doesn't match the tool's internal validation rules (e.g., priority "High" vs "P1").234235## Guardrails236237- Do not redesign coverage.238- Do not add missing business logic.239- Do not silently assign invented metadata.240- Do not mix analysis commentary into import-ready artifacts.241- Do not claim a destination is validated when the repo only supports heuristic checks.242- Do not turn runtime normalization into persistent skill memory.243- Do not claim support for a newly researched destination until the repo contains the necessary references, examples, and tests.244245## Extensibility Hooks246247- Add new destinations by extending `./references/destination-field-matrix.md`, adding or updating the relevant template or reference contract, and teaching `./scripts/format-validator.py` only when deterministic validation is feasible.248- Keep destination-specific behavior in references and templates, not bloated into this file.249- Preserve backward compatibility for existing destination names unless there is a clear migration reason.