Xray integration
Test Execution Flow:
- When tests start running, handleTestRunStarted is called
- If xray.export=true, it creates a new Test Execution (TE) in Jira
- The TE ID is stored and a title is generated with timestamp
- As each test runs:
- handleTestCaseStarted tracks test progress
- handleTestCaseFinished updates test status in Jira
- Test results are sent to Jira with appropriate status codes Summary File Creation Flow:
- After all tests complete, tearDown() is called
- If xray.export=true:
- Sets TE status to "Done" in Jira
- Creates a summary file (test-execution-summary.txt) containing:
- TE ID and title
- Test statistics (total/completed)
- Links to Jira TE and Allure report
- Logs the TE link in console Status Mapping: Test statuses are mapped to Jira status codes:
- PASS → 0
- FAIL → 3
- TODO → 2
- EXECUTING → 2 Conditional Execution:
- All Jira operations only happen if xray.export=true
- If xray.export=false, tests run normally without Jira integration
- Error Handling:
- Failed tests are logged with error messages
- Test execution status is tracked Summary file creation errors are caught and logged This implementation ensures that test results are properly tracked in Jira and provides a summary of the test execution for reference.