Versions Compared

Key

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

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}

...

Code Block
titleExpand to see the example on sample code
collapsetrue
#{for teststeps}
    ${TestSteps[n].StepNumber}
    ${TestSteps[n].Step}
    ${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

...

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

...

Code Block
titleExpand to see the example on sample code
collapsetrue
#{for preconditions}
	${PreConditions[n].Key}
	${PreConditions[n].Summary}
	${PreConditions[n].Description}
	${PreConditions[n].Conditions}
#{end}


or


#{for j=PreConditionsCount}
	${PreConditions[j].Key}
	${PreConditions[j].Summary}
	${PreConditions[j].Description}
	${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:

...

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

...

Code Block
titleExpand to see the example on sample code
collapsetrue
#{for testPlans}
	${TestPlans[n].Key}
	${TestPlans[n].Summary}
	${TestPlans[n].Description}
#{end}

Test Runs associated with a Test

Definition:

$ {TestRuns[n].Field}

...