From a Test Plan, it's possible to export the following Xray data: Tests and Test Executions.

Given that the Test Plan behaves like a regular JIRA issue, you can also export any other JIRA field.

Some general mappings we can export from a Test Plan
Key: ${Key}
Description: ${Description}

#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 Plan

Below you can find an example of how to iterate over the list of Tests associated with a Test Plan.

Iterate over tests
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 page Exporting Test.


Exporting Test Executions from a Test Plan

Below you can find an example of how to iterate over the list of TestExecutions associated with a Test.

Iterate over test executions
Total number of associated test executions: ${TestExecutionsCount}

// Iterating each test execution
#{for testExecutions}
	Key: ${TestExecutions[n].Key}
	Test Environments: ${TestExecutions[n].TestEnvironments}
#{end}
 
or
 
// Iterating each test execution
#{for j=TestExecutionsCount}
	Summary: ${TestExecutions[j].Summary}
	Test Environments: ${TestExecutions[j].TestEnvironments}
#{end}

// Print the Test Execution issue keys
${TestExecutionKeys}

For more detailed information on how to export Test Executions and its information please check the page Exporting Test Execution.


The word document below shows an example with all the mappings available to export from a Test Plan:

Xray_Test_Plan.docx

  • No labels