From a Test Execution, it's possible to export the following Xray data: Tests, Test Runs and Test Plans.
All fields listed here are available because the Test Execution is a regular JIRA issue. In addition, you can export the following fields:
Test Environments: ${TestEnvironments} #Overall Execution Status (percentage + total of testes per status) TO DO: ${Overall Execution Status.TO DO.Percentage}% - ${Overall Execution Status.TO DO.Count} EXECUTING: ${Overall Execution Status.EXECUTING.Percentage}% - ${Overall Execution Status.EXECUTING.Count} PASSED: ${Overall Execution Status.PASSED.Percentage}% - ${Overall Execution Status.PASSED.Count} FAILED: ${Overall Execution Status.FAILED.Percentage}% - ${Overall Execution Status.FAILED.Count} ABORTED: ${Overall Execution Status.ABORTED.Percentage}% - ${Overall Execution Status.ABORTED.Count}
Exporting Tests from a Test Execution
Below you can find an example of how to iterate over the list of Tests associated with a Test Execution.
Total number of associated tests: ${TestsCount} // Iterating each test #{for tests} Key: ${Tests[n].Key} Test Status: ${Tests[n].TestStatus} // Iterating over test steps for each test #{for m=Tests[n].TestStepsCount} Action: ${Tests[n].TestSteps[m].Action} Data: ${Tests[n].TestSteps[m].Data} Expected Result: ${Tests[n].TestSteps[m].ExpectedResult} #{end} #{end} or // Iterating each test #{for j=TestsCount} Key: ${Tests[j].Key} Test Status: ${Tests[j].TestStatus} // Iterating over test steps for each test #{for m=Tests[j].TestStepsCount} Action: ${Tests[j].TestSteps[m].Action} Data: ${Tests[j].TestSteps[m].Data} Expected Result: ${Tests[j].TestSteps[m].ExpectedResult} #{end} #{end}
For more detailed information on how to export Tests and its information please check the documentation.
Exporting Test Plans from a Test Execution
Below you can find an example of how to iterate over the list of TestPlans associated with a Test Execution.
Total number of associated test plans: ${TestPlansCount} // Iterating each test plan #{for testPlans} Summary: ${TestPlans[n].Summary} #{end} or // Iterating each test plan #{for j=TestPlansCount} Description: ${TestPlans[j].Description} #{end}
For more detailed information on how to export Test Plans and its information please check the documentation.
Exporting Test Runs from a Test Execution
All fields listed here are available and will refer to the test execution associated. In addition, you can export the following fields:
AssigneeId | The test execution's assignee. |
Comment | The test execution's comment. |
Generic Test Definition | The generic test definition of the test run. WIKI |
Cucumber Scenario | The cucumber definition of the test run |
Executed By | The user's ID that executed the test execution. |
Execution Status | The status of the test execution. |
Started On | The started date of the test execution. |
Finished On | The end date of the test execution. |
ExecutionEvidencesCount | The number of execution evidences. |
ExecutionDefectsCount | The number of execution defects. |
TestStepsCount | The test execution's steps count. |
TestType | The test execution's test type. |
TestStepsDefectsCount | The number of defects for all test steps. |
Total number of associated test runs: ${TestRunsCount} // Iterating each test run #{for testruns} Assignee Id: ${TestRuns[n].AssigneeId} Key: ${TestRuns[n].Key} Summary: ${TestRuns[n].Summary} Comment: ${TestRuns[n].Comment} Generic Test Definition: ${wiki:TestRuns[n].Generic Test Definition} Cucumber Scenario: ${TestRuns[n].Cucumber Scenario} Executed by: ${TestRuns[n].Executed By} Execution Status: ${TestRuns[n].Execution Status} Started on: ${TestRuns[n].Started On} Finished on: ${TestRuns[n].Finished On} Test Type: ${TestRuns[n].TestType} // Iterating over execution evidences for each test run Execution Evidences Total: ${TestRuns[n].ExecutionEvidencesCount} #{for m=TestRuns[n].ExecutionEvidencesCount} Id: ${TestRuns[n].ExecutionEvidences[m].Id} Name: ${TestRuns[n].ExecutionEvidences[m].Name} Evidence Image: ${TestRuns[n].ExecutionEvidences[m].Evidence} #{end} // Iterating over execution defects for each test run Execution Defects Total: ${TestRuns[n].ExecutionDefectsCount} #{for m=TestRuns[n].ExecutionDefectsCount} Id: ${TestRuns[n].ExecutionDefects[m].Id} Description: ${TestRuns[n].ExecutionDefects[m].Description} Key: ${TestRuns[n].ExecutionDefects[m].Key} Summary: ${TestRuns[n].ExecutionDefects[m].Summary} #{end} // Iterating over test steps for each test run Test Steps Total: ${TestRuns[n].TestStepsCount} #{for m=TestRuns[n].TestStepsCount} Action: ${wiki:TestRuns[n].TestSteps[m].Action} Comment: ${TestRuns[n].TestSteps[m].Comment} Data: ${wiki:TestRuns[n].TestSteps[m].Data} Expected Result: ${wiki:TestRuns[n].TestSteps[m].ExpectedResult} Actual Result: ${wiki:TestRuns[n].TestSteps[m].ActualResult} Status: ${TestRuns[n].TestSteps[m].Status} Step Number: ${TestRuns[n].TestSteps[m].StepNumber} // Iterating over attachments for each test step Test Steps Attachments Count: ${TestRuns[n].TestSteps[m].AttachmentsCount} #{for l=TestRuns[n].TestSteps[m].AttachmentsCount} Id: ${TestRuns[n].TestSteps[m].Attachments[l].Id} Name: ${TestRuns[n].TestSteps[m].Attachments[l].Name} Attachment Image: ${TestRuns[n].TestSteps[m].Attachments[l].Attachment} #{end} // Iterating over evidences for each test step Test Steps Evidences Count: ${TestRuns[n].TestSteps[m].EvidencesCount} #{for l=TestRuns[n].TestSteps[m].EvidencesCount} Id: ${TestRuns[n].TestSteps[m].Evidences[l].Id} Name: ${TestRuns[n].TestSteps[m].Evidences[l].Name} Evidence Image: ${TestRuns[n].ExecutionEvidences[m].Evidence} #{end} // Iterating over defects for each test step Test Steps Evidences Count: ${TestRuns[n].TestSteps[m].DefectsCount} #{for l=TestRuns[n].TestSteps[m].DefectsCount} Description: ${TestRuns[n].TestSteps[m].Defects[l].Description} Id: ${TestRuns[n].TestSteps[m].Defects[l].Id} Key: ${TestRuns[n].TestSteps[m].Defects[l].Key} Summary: ${TestRuns[n].TestSteps[m].Defects[l].Summary} #{end} #{end} #{end}
The word document below shows an example with all the mappings available to export from a TestExecution:
WIKI indicates that the field supports wiki format. More about here.