Page History
Document Generator allows you to get following data from the Xray Test Set:
Table of Contents |
---|
Test Set Status
Export all Test Set Status with name and percentage from the Test Set
Code Block |
---|
${Test Set Status} |
You can print the status of the Test Set by using the following notation:
% per Status | Number of Tests per Status |
---|---|
${Test Set Status.NameOfStatus} | ${Test Set Status.NameOfStatus.Count} |
See the real example below:
Code Block |
---|
#Test Set Status Percentage + total of testes per status
Todo: ${Test Set Status.TODO} % (${Test Set Status.TODO.Count})
Fail: ${Test Set Status.FAIL} % (${Test Set Status.FAIL.Count})
Pass: ${Test Set Status.PASS} % (${Test Set Status.PASS.Count})
Executing: ${Test Set Status.EXECUTING} % (${Test Set Status.EXECUTING.Count})
Aborted: ${Test Set Status.ABORTED} % (${Test Set Status.ABORTED.Count}) |
Iterating over Tests
As it is not known in advance how many Tests exist in a Test Set, there is a notation that allows iterating a section over all the Tests of a Test Set. The notation is:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for tests}
Content and Test Mappings. Example: ${Tests[n].Key}
#{end}
or
#{for j=TestsCount}
Content and Test Mappings. Example: ${Tests[j].Summary}
#{end} |
n is the index of Test, starting from 0. The field TestsCount was created in order to give the total of Tests.
Note: Test Sets are Jira Issues + Xray data, so, you can print native Jira fields or even native Iterations. You can have a combination of both if you need.