I'm trying to modify the stock Test Plan report to include a column that lists defect keys in the Test Summary Table. I'm running into the problem that to get the defects I either need to provide the requirements, or executions from the test. This requires a nested for loop, which I can't figure out.
This is what I'm working with:
${prop(xporter.document.autofit,true)}
Key | Summary | Issue Assignee | Requirements | Defects | #TestExecutions | Latest Status |
${set(TestKeyIncluded, 'A')}
#{for tests}
#{if (%{'${statusesToShowFirst}'.trim().equals('') || ‘${statusesToShowFirst}’.contains(‘${Tests[n].TestStatus}’)})}
${set(TestKeyIncluded,%{'${TestKeyIncluded}'.concat('${Tests[n].Key},')})}
@{title=${Tests[n].Key}|href=${BaseURL}/browse/${Tests[n].Key}} | ${Tests[n].Summary} | #{if (%{!'${Tests[n].Assignee}'.equals('')})} ${fullname:Tests[n].Assignee} #{end} | #{for a=JQLIssuesCount|clause=key in testRequirements('${Tests[n].Key}')} | #{for a=JQLIssuesCount|clause=key in testRequirements('${Tests[n].Key}')} | ${jqlcount:issue in testTestExecutions('${Tests[n].Key}') and 'Test Plan' = ${Key}} | #{if (%{'${Tests[n].Latest Status}'.equals('FAIL')})} |
I've tried to iterate through what is pulling in the requirements:
#{for a=JQLIssuesCount|clause=key in testRequirements('${Tests[n].Key}')}
${JQLIssues[a].Key}
#{end}
like this:
#{for a=JQLIssuesCount|clause=key in testRequirements('${Tests[n].Key}')}
#{for b=JQLIssuesCount|clause=key in defectsCreatedForRequirement(${JQLIssues[a].Key})}
${JQLIssues[b].Key}
#{end}
#{end}
Any suggestions on how to list defects on the Test Summary table in the Test Plan Xporter Report?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.