3. Preview the Jira/Xray import¶
Continue from 2. Run two input cases. Use the same xray-demo folder and activated environment.
Save this synthetic configuration as case-config.json. Replace the placeholder
IDs with administrator-confirmed values before uploading. namespace identifies
this suite within the Jira project; keep it stable and unique across repositories.
{
"project": "DEMO",
"namespace": "example-suite",
"test_issue_type": "100",
"execution_issue_type": "101",
"test_type_field": "customfield_10",
"definition_field": "customfield_11",
"extra_fields": {}
}
The plan contains two different SHA-256 identities, two proposed Generic Test
creation documents and independent PASS results. It is not an Xray import file:
no Jira keys exist yet. Summaries and definitions use opaque identities, not raw
parameter values, node IDs or case IDs. Hashing is not encryption; predictable
inputs can be guessed. extra_fields is copied as supplied and may be sensitive.
python -m pytest --collect-only -q --xray-case-config=case-config.json --xray-case-plan=collection.json
To identify just one case before looking up its eventual Jira key:
python -m pytest -q -k one-plus-one --xray-case-config=case-config.json --xray-case-plan=singleton.json
Record the sole cases[0].identity. After the authorized online run below, find
that exact identity in case-map.json under cases; its confirmed key is the
separate Generic Test issue for this case. The plan itself contains no Jira key.
Collect-only records NOT_RUN without executing tests or using the network. Plans are local output files; use access controls appropriate to their contents.