...
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 |
---|---|
ParametersCount | Total of Parameters declared in Dataset |
IsDataDriven | Returns "true" if the current test run is data-driven; otherwise, it returns "false" |
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 |
Iterations Overall Execution Status.STATUS.Percentage | The percentage of STATUS in the test run iterations |
Parameters | List of the parameters from each test run iteration |
Info | ||
---|---|---|
| ||
The field IsDataDriven is going to return TRUE only if the test run has more than one iteration. |
Exporting Test Runs Parameters from a Test Execution
For each Test Run Parameter you can export the following fields:
- Key
- Value
Below you can find an example of how to iterate over the list of Test Run Parameters associated with a Test Execution.
Code Block | ||
---|---|---|
| ||
// Iterating each test run
#{for testruns}
// Iterating over parameters for each test run
Parameters Total: ${TestRuns[n].ParametersCount}
#{for m=TestRuns[n].ParametersCount}
Key: ${TestRuns[n].Parameters[m].Key}
Value: ${TestRuns[n].Parameters[m].Value}
#{end}
#{end} |
Exporting Test Runs Iterations from a Test Execution
For each Test Run Iteration you can export the following fields:
- Overall Execution Status
- Parameters from Test Run Iterations
- Test steps from Test Run Iterations
Below you can find an example of how to iterate over the list of Test Run Iterations associated with a Test Execution.
Code Block | ||
---|---|---|
| ||
// Iterating each test run
#{for testruns}
IsDataDriven: ${TestRuns[n].IsDataDriven}
// Iterations Overall Execution Status (percentage + total of testes per status)
List of Statuses: ${TestRuns[n].IterationsOverallExecutionStatus}
TO DO: ${TestRuns[n].IterationsOverallExecutionStatus.TO DO.Percentage}% - ${TestRuns[n].Iterations Overall Execution Status.TO DO.Count}
EXECUTING: ${TestRuns[n].IterationsOverallExecutionStatus.EXECUTING.Percentage}% - ${TestRuns[n].Iterations Overall Execution Status.EXECUTING.Count}
PASSED: ${TestRuns[n].IterationsOverallExecutionStatus.PASSED.Percentage}% - ${TestRuns[n].Iterations Overall Execution Status.PASSED.Count}
FAILED: ${TestRuns[n].IterationsOverallExecutionStatus.FAILED.Percentage}% - ${TestRuns[n].Iterations Overall Execution Status.FAILED.Count}
ABORTED: ${TestRuns[n].IterationsOverallExecutionStatus.ABORTED.Percentage}% - ${TestRuns[n].Iterations Overall Execution Status.ABORTED.Count}
// Iterating over test runs iterations
Total of Iterations from a Test Run: ${TestRuns[n].IterationsCount}
#{for m=TestRuns[n].IterationsCount}
Name: ${TestRuns[n].Iterations[m].Name}
Status: ${TestRuns[n].Iterations[m].Status}
Parameters: ${TestRuns[n].Iterations[m].Parameters}
// Iterating over parameters for each test run iteration
Parameters Total: ${TestRuns[n].Iterations[m].ParametersCount}
#{for l=TestRuns[n].Iterations[m].ParametersCount}
Key: ${TestRuns[n].Iterations[m].Parameters[l].Key}
Value: ${TestRuns[n].Iterations[m].Parameters[l].Value}
#{end}
// Iterating over preconditions for each test run iteration
Preconditions Total: ${TestRuns[n].Iterations[m].PreConditionsCount}
#{for l=TestRuns[n].Iterations[m].PreConditionsCount}
Definition: ${TestRuns[n].Iterations[m].PreConditions[l].PreCondition.Definition}
Type: ${TestRuns[n].Iterations[m].PreConditions[l].PreCondition.Type}
#{end}
//Iterating over test steps for each test run iteration
#{for i=TestRuns[n].Iterations[m].TestStepsCount}
Step Number: ${TestRuns[n].Iterations[m].TestSteps[i].StepNumber}
Action: ${TestRuns[n].Iterations[m].TestSteps[i].Action}
Data: ${TestRuns[n].Iterations[m].TestSteps[i].Data}
Expected Result: ${TestRuns[n].Iterations[m].TestSteps[i].ExpectedResult}
Status: ${TestRuns[n].Iterations[m].TestSteps[i].Status}
Comment: ${TestRuns[n].Iterations[m].TestSteps[i].Comment}
Actual Result: ${TestRuns[n].Iterations[m].TestSteps[i].ActualResult}
// Iteration Test Step Attachments
#{for l=TestRuns[n].Iterations[m].TestSteps[i].AttachmentsCount}
Id: ${TestRuns[n].Iterations[m].TestSteps[i].Attachments[l].Id}
Name: ${TestRuns[n].Iterations[m].TestSteps[i].Attachments[l].Name}
Image: ${TestRuns[n].Iterations[m].TestSteps[i].Attachments[l].Attachment}
FileURL: ${TestRuns[n].Iterations[m].TestSteps[i].Attachments[l].FileURL}
#{end}
// Iteration Test Step Evidences
#{for l=TestRuns[n].Iterations[m].TestSteps[i].EvidencesCount}
Id: ${TestRuns[n].Iterations[m].TestSteps[i].Evidences[l].Id}
Name: ${TestRuns[n].Iterations[m].TestSteps[i].Evidences[l].Name}
File URL: ${TestRuns[n].Iterations[m].TestSteps[i].Evidences[l].FileURL}
Evidence: ${TestRuns[n].Iterations[m].TestSteps[i].Evidences[l].Evidence}
#{end}
// Iteration Test Step Defects
#{for l=TestRuns[n].Iterations[m].TestSteps[i].DefectsCount}
Description: ${TestRuns[n].Iterations[m].TestSteps[i].Defects[l].Description}
Id: ${TestRuns[n].Iterations[m].TestSteps[i].Defects[l].Id}
Key: ${TestRuns[n].Iterations[m].TestSteps[i].Defects[l].Key}
Summary: ${TestRuns[n].Iterations[m].TestSteps[i].Defects[l].Summary}
#{end}
#{end}
#{end}
#{end} |
The word document below shows an example with all the mappings available to export from a TestExecution:
Xray_Param_Test_Executions.docx
Info | ||||||||
---|---|---|---|---|---|---|---|---|
|