Details
-
Suggestion
-
Status: New
-
Resolution: Unresolved
-
None
-
None
-
None
-
-
21
Description
Description
Currently, when generating Cucumber Feature files, Xray generates one file per Requirement associated with the same Test.
As documented in Generate Cucumber Features documentation:
-> “A single Cucumber feature file is generated for each requirement associated with this Test.”
This causes the same automated Scenario/Test to be exported multiple times whenever a single Test is linked to multiple Requirements.
Many customers use Requirement <-> Test links only for traceability/reporting and do not expect the automation to execute the exact same Scenario multiple times because of multiple Requirement associations.
This Suggestion is to provide a native option to:
- export only one .feature file per Test
- merge all associated @REQ_XXXX tags into the same feature file
- optionally make this behavior configurable through Xray settings
Example desired output:
@REQ_REQ-1
@REQ_REQ-2
@REQ_REQ-3
@TEST_TEST-123
Scenario: Validate payment processing
Instead of generating 3 separate .feature files containing the exact same Scenario.
User friction
Customers with large-scale automation suites linked to multiple Requirements experience:
- duplicated automated executions
- longer CI/CD execution times
- inflated infrastructure usage
- duplicated reports/results
- unnecessary maintenance complexity
This behavior is especially problematic in organizations where:
- one Test validates multiple Requirements
- Requirement links are used strictly for traceability/compliance
- the same automated Scenario should execute only once
Steps to reproduce (right now) / Actual Result:
1. Create one Cucumber Test in Xray
2. Link the same Test to multiple Requirement issues
3. Export Cucumber feature file
4. Observe generated files
Actual Result:
- Xray generates one .feature file per linked Requirement
- Each file contains the same @TEST_XXXX Scenario
- Automation frameworks execute the same Scenario multiple times
IMPACT
- thousands of automated Tests
- many Requirement/Test relationships
- large CI/CD pipelines
This can significantly increase:
- pipeline duration
- maintenance overhead
What would improve if solved:
- Reduced duplicated test executions
- Faster CI/CD pipelines
- Lower infrastructure/resource consumption
- Cleaner automation repositories
- Better alignment between traceability and execution behavior
- Improved scalability for enterprise automation
Impact on stakeholders:
- DevOps/CI pipeline
- Test Managers
- Compliance/Traceability teams
- Customers with shared reusable Tests
Current workaround:
Customers must implement custom deduplication logic outside Xray, for example:
- custom Python scripts
- CI/CD preprocessing steps
- feature-file filtering logic
These scripts:
- identify duplicated @TEST_XXXX Scenarios
- merge @REQ_XXXX tags
- remove duplicated feature files before execution
CONTEXT & EXAMPLES:
Current behavior:
- Test TEST-123
- Linked to:
- REQ-1
- REQ-2
- REQ-3
Generated output:
- 1_REQ-1.feature
- 2_REQ-2.feature
- 3_REQ-3.feature
All containing the exact same Scenario/Test.
Desired behavior:
- Single exported .feature file
- Multiple @REQ_ tags merged into one file
Concrete example:
A customer with:
- 5,000 automated Tests
- each linked on average to 4 Requirements
Current behavior may generate:
- ~20,000 exported .feature files
- 4x duplicated Scenario executions
Even though the actual automation logic is identical.
Workaround risk:
The current workaround requires customers to maintain custom scripts and CI logic outside Xray.
Risks include:
- accidental removal of valid Scenarios
- incorrect tag merging
- maintenance burden during upgrades
- inconsistent execution behavior across teams
- additional troubleshooting complexity
A native Xray-supported solution would provide a more reliable and scalable approach.