xRay Integration
xRay is Jira's test management add-on. RoostGPT integrates with xRay by generating Gherkin .feature files that can be imported directly as xRay Tests, maintaining full traceability from Jira stories to executable tests.
How It Works
- RoostGPT generates a Gherkin feature file during the Functional Test phase (from a Jira user story)
- You import the
.featurefile into xRay — this creates xRay Test entities automatically - xRay links the tests back to the originating Jira story, giving you full requirement-to-test traceability
- Run the tests in xRay using your CI/CD pipeline or manually, and view results in Jira
Step 1: Generate a Gherkin Feature File
In RoostGPT, run a Functional Test generation against a Jira ticket. This produces:
functional_tests/
├── PROJ-1234_test_scenarios.md ← test scenarios
├── PROJ-1234.feature ← Gherkin feature file ← upload this to xRay
└── PROJ-1234.yaml ← API spec
See Functional Test Generation for the full generation workflow.
Step 2: Import into xRay
Via Jira UI
- In Jira, navigate to the xRay section in the left sidebar
- Go to Tests → Import
- Select Cucumber as the import type
- Upload your
.featurefile - xRay creates a Test entity for each
ScenarioorScenario Outline
Via xRay REST API
curl -X POST \
"https://yourcompany.atlassian.net/rest/raven/1.0/import/feature" \
-H "Authorization: Bearer YOUR_XRAY_TOKEN" \
-F "file=@PROJ-1234.feature"
Via xRay Cloud API
curl -X POST \
"https://xray.cloud.getxray.app/api/v1/import/feature" \
-H "Authorization: Bearer YOUR_XRAY_CLOUD_TOKEN" \
-F "file=@PROJ-1234.feature"
Step 3: Link Tests to Requirements
After import, xRay will prompt you to associate the imported Tests with a Jira requirement (User Story):
- Open the created xRay Test
- Click "Link" → select the original Jira story (e.g.,
PROJ-1234) - The traceability matrix now shows: Story → Feature → Scenario → Test Execution
Step 4: Execute Tests
Run your integration tests against the xRay-imported scenarios using your preferred CI/CD tool, then publish results back to xRay:
# Example: publish Cucumber JSON results to xRay
curl -X POST \
"https://yourcompany.atlassian.net/rest/raven/1.0/import/execution/cucumber" \
-H "Authorization: Bearer YOUR_XRAY_TOKEN" \
-H "Content-Type: application/json" \
-d @cucumber-results.json
Requirements
- Jira with xRay add-on installed (Server, Data Center, or Cloud)
- RoostGPT Functional Test generation enabled
- xRay API token or Jira credentials with xRay permissions