Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

...

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.

...

Code Block
titleExpand to see the example on sample code
collapsetrue
#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}

Test Execution from a Test Run associated with Test

It is possible to access Test Execution information by iterating over tests and their Test Runs. The notation is: 

...

Example: Image that you have a custom field called "Run CF". To get the value printed on your you document you just have to use the following placeholder:

...

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.

FieldsDescription
IsDataDriven

Returns "true" if the current test run is data-driven; otherwise, it returns "false"

Iterations Overall Execution Status.STATUS.PercentageThe 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.CountThe number of STATUS in the test run iterations
ParametersList of the parameters from each test run iteration
ParametersCountTotal of Parameters declared in Dataset
Info
titleData-driven

The field IsDataDriven is going to return TRUE only if the test run has more than one iteration.

...