Page History
Document Generator allows you to get the following data from the Xray Test:
...
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:
...
Code Block | ||||
---|---|---|---|---|
| ||||
#{for teststeps}
${TestSteps[n].StepNumber}
${TestSteps[n].Action}
${TestSteps[n].Data}
${TestSteps[n].ExpectedResult}
#{end} |
Modular Test Steps
You can check if a Step is a Call Test with the mapping IsCalledTest.
Call Steps have the following fields available:
- IsCalledTest (which will be true if the step is a called step; false if it's a normal step)
IsDeletedCalledTest (which will indicate if the called step issue was deleted)
IsInvalidIssueTypeCalledTest (which will indicate if the called step issue type has changed)
- CalledTestParameters (the Called Test Dataset Parameters in Json format)
- CalledTest.Field (The issue called. You can export its information)
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for teststeps}
#{if (%{${TestSteps[n].IsCalledTest}})}
#{if (%{${TestSteps[n].IsDeletedCalledTest}})}
Called test issue not found.
#{end}
#{if (%{${TestSteps[n].IsInvalidIssueTypeCalledTest}})}
Called test issue type is invalid.
#{end}
#{if (%{!${TestSteps[n].IsDeletedCalledTest} && !${TestSteps[n].IsInvalidIssueTypeCalledTest}})}
${TestSteps[n].CalledTestParameters}
${TestSteps[n].CalledTest.Key}
${TestSteps[n].CalledTest.Summary}
#{end}
#{end}
#{end} |
Modular Test Steps Parameters
You can iterate over the Test Call Parameters:
Code Block | ||||
---|---|---|---|---|
| ||||
#{for teststeps}
#{if (%{${TestSteps[n].IsCalledTest}})}
#{for p=TestSteps[n].CalledTestParametersCount}
${TestSteps[n].CalledTestParameters[p].Name}
${TestSteps[n].CalledTestParameters[p].Value}
#{end}
#{end}
#{end} |
Manual Test Steps Attachments
Document Generator allows rendering all Attachments of Manual Test Steps of a Test.
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:
...
Info |
---|
If your custom field type is a Number, Data, or Date Time you can use formatting functions. |
Pre-Conditions associated with a Test
Document Generator 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 or PreconditionsCount was created in order to give the total number of Pre-Conditions.
...
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.
...
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.
...
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.
...
Info |
---|
If your custom field type is a Number, Data or Date Time you can use formatting functions. |
Exporting Parameterized Tests from a Test Run
To export all this data, we first need to execute the test run. If we change any data, we need to return to the Execution Page and merge it with the new data.
Fields | Description |
---|---|
IsDataDriven | Returns "true" if the current test run is data-driven; otherwise, it returns "false" |
Iterations Overall Execution Status.STATUS.Percentage | The percentage of STATUS in the test run iterations |
IterationsOverallExecutionStatus | List of all the statuses in the current test run iteration and their percentages |
IterationsOverallExecutionStatus.STATUS.Count | The number of STATUS in the test run iterations |
Parameters | List of the parameters from each test run iteration |
ParametersCount | Total of Parameters declared in Dataset |
Info | ||
---|---|---|
| ||
The field IsDataDriven is going to return TRUE only if the test run has more than one iteration. |
...