Page History
Document Generator allows you to get following data from the Xray Test:
Table of Contents |
---|
Test Status
To get the status of the Test printed on the document you just need to put the following placeholder in your template:
Code Block |
---|
${TestRunStatus} |
Iterating over Test Steps
Manual Test Steps
Definition:
$ {TestSteps[n].Field} |
n is the index of Test Step, starting from 0. The field TestStepsCount was created in order to give the total number of Test Steps. The fields available for Test Steps are:
- StepNumber
- Action
- Data
- ExpectedResult
Code Block | ||||
---|---|---|---|---|
| ||||
#{for teststeps} ${TestSteps[n].StepNumber} ${TestSteps[n].Action} ${TestSteps[n].Data} ${TestSteps[n].ExpectedResult} #{end} |
Manual Test Steps Attachments
Xporter for Jira allows rendering all Attachments of Manual Test Steps of a Test. This feature is available on Xporter 5.4.0 and Xray 3.0.0 and above
Definition:
$ {TestSteps[n].Attachments[m].Field} |
n is the index of Test Step and m is the index of the Attachment. The field AttachmentsCount was created in order to give the total number of Attachments. The fields available for Test Step Attachments are:
- ID
- Name
- Author
- AuthorFullName
- Created
- Size
- HumanReadableSize
- MimeType
- FileURL
Code Block | ||||
---|---|---|---|---|
| ||||
#{for teststeps} #{for m=TestSteps[n].AttachmentsCount} ${TestSteps[n].Attachments[m].ID} ${TestSteps[n].Attachments[m].Name} ${TestSteps[n].Attachments[m].Author} ${TestSteps[n].Attachments[m].AuthorFullName} ${TestSteps[n].Attachments[m].Created} ${TestSteps[n].Attachments[m].Size} ${TestSteps[n].Attachments[m].HumanReadableSize} ${TestSteps[n].Attachments[m].MimeType} ${TestSteps[n].Attachments[m].FileURL} #{end} #{end} |
Pre-Conditions associated with a Test
Xporter for Jira allows rendering of all the Pre-Conditions associated with a Test.
Definition:
$ {PreConditions[n].Field} |
n is the index of the Pre-Condition, starting from 0. The field PreConditionsCount was created in order to give the total number of Pre-Conditions.
Since Pre-Condition is a Jira Issue, you can render all the normal mappings which you are used to.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for preconditions} ${PreConditions[n].Key} ${PreConditions[n].Summary} ${PreConditions[n].Description} ${PreConditions[n].Pre-Condition Type} ${PreConditions[n].Conditions} #{end} or #{for j=PreConditionsCount} ${PreConditions[j].Key} ${PreConditions[j].Summary} ${PreConditions[j].Description} ${PreConditions[j].Pre-Condition Type} ${PreConditions[j].Conditions} #{end} |
Requirements associated with a Test
You can print all the Requirements associated with a Test using an Xray Enhanced querying JQL Function, where you input the given Test Key:
JQL Function:
testRequirements('${Key}') |
In order to give the total of Requirements associated with a given Test, you can use the following JQL Count statement, where you input the given Test Key:
${jqlcount:testRequirements('${Key}')} |
n is the index of the Pre-Condition, starting from 0. The field PreConditionsCount was created in order to give the total number of Pre-Conditions.
Since a Requirement is a Jira Issue, you can render all the normal mappings which you are used to.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for k=JQLIssuesCount|clause=key in testRequirements('${Key}')} ${JQLIssues[k].Key} ${JQLIssues[k].Summary} ${JQLIssues[k].Description} #{end} |
You can also Iterate over all the Requirements associated with a Test while iterating over all Tests of a Test Set.
Code Block | ||||
---|---|---|---|---|
| ||||
#{for tests} ${Tests[n].Key} ${Tests[n].Summary} #{for k=JQLIssuesCount|clause=key in testRequirements('Tests[n].Key')} ${Tests[n].JQLIssues[k].Key} ${Tests[n].JQLIssues[k].Summary} ${Tests[n].JQLIssues[k].Description} #{end} #{end} |
Test Plans associated with a Test
Definition:
$ {TestPlans[n].Field} |
n is the index of the Test Plan, starting from 0. The field TestPlansCount was created in order to give the total number of Test Plans.
Since a Test Plan is a Jira Issue, you can render all the normal mappings which you are used to.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for testPlans} ${TestPlans[n].Key} ${TestPlans[n].Summary} ${TestPlans[n].Description} #{end} |
Test Runs associated with a Test
Definition:
$ {TestRuns[n].Field} |
n is the index of the Test Run, starting from 0. The field TestRunsCount was created in order to give the total number of Test Runs.
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
#Iterating over Test Runs #{for testruns} Execution Status: ${TestRuns[n].Execution Status} AssigneeID: ${AssigneeId} Rank: ${TestRuns[n].Rank} Executed By: ${TestRuns[n].Executed By} Started On: ${TestRuns[n].Started On} Finished On: ${TestRuns[n].Finished On} Comment: ${wiki:TestRuns[n].Comment} Execution Defects Count: ${TestRuns[n].ExecutionDefectsCount} TestSteps Defects Count: ${TestRuns[n].TestStepsDefectsCount} Evidences Count: ${TestRuns[n].ExecutionEvidencesCount} #{end} |