Versions Compared

Key

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

...

  1. insert column
  2. on the "Test Runs" sheet,
    1. copy "Test Summary" (i.e., insert a column  next to it and copy the values from the existing "Test Summary" column)
    2. change
      1. ${TestRuns[n].Summary} to ${TestRuns[n].Severity}
      2. ${TestExecutions[j].TestRuns[n].Severity} to ${TestExecutions[j].TestRuns[n].Severity}
  3. follow a similar approach for the "Test Runs including iterations" sheet


Exercise: add total Evidence count

Let's say we want to know the total count of evidence items for each run and iteration. You can add the column next to the "Comment" one, then the code logic is similar to the defect count. Please see the snippet below (this exact syntax is for the "Test Runs" tab):


Code Block
languagejs
titleEvidenceSnippet
collapsetrue
${set(totalStepEvidenceCount, 0)}
${set(totalEvidenceCount, 0)}
#{if (%{!${TestExecutions[j].TestRuns[n].IsDataDriven}})}
#{for m=TestExecutions[j].TestRuns[n].TestStepsCount}
#{for l=TestExecutions[j].TestRuns[n].TestSteps[m].EvidencesCount}
${set(totalStepEvidenceCount,%{${totalStepEvidenceCount} + 1 })}
#{end}
#{end}
${set(totalEvidenceCount,%{${totalStepEvidenceCount} + ${TestExecutions[j].TestRuns[n].ExecutionEvidencesCount} })}
#{end}
#{if (%{${TestExecutions[j].TestRuns[n].IsDataDriven}})}
#{for m=TestExecutions[j].TestRuns[n].IterationsCount}
#{for k=TestExecutions[j].TestRuns[n].Iterations[m].TestStepsCount}
#{for l=TestExecutions[j].TestRuns[n].Iterations[m].TestSteps[k].EvidencesCount}
${set(totalStepEvidenceCount,%{${totalStepEvidenceCount} + 1 })}
#{end}
#{end}
${set(totalEvidenceCount,%{${totalStepEvidenceCount} + ${TestExecutions[j].TestRuns[n].ExecutionEvidencesCount} })}
#{end}
#{end}
${totalEvidenceCount}


Keep in mind that the core part of the path to the target (i.e. "TestExecutions[j].TestRuns[n]." above) is dependent on the source issue type, so you will need to adjust it based on the row in the template. You can refer to other cells in the same row for the path syntax.

For the "Test Runs including Iterations" tab, you will only need the content of one of the two "if" loops for each row and, for the data-driven rows, you will need to drop the additional "for" loop (i.e. "#{for m=TestExecutions[j].TestRuns[n].IterationsCount}" from the second "if" loop in the snippet above).



Performance

Performance can be impacted by the information that is rendered and by how that information is collected/processed.

...