Xray Requirement Coverage with last testcase status

Hello EazyBI community,

I’m currently working on a requirement coverage view in EazyBI. My Datasource is Jira Cloud with Xray.
Obviously I used the awesome template in the documentation. Xray Requirement coverage
That was very helpful for a good start.
But now I would like to display the last Test Run status instead of all the Test Run counts. It should follow the same structure als currently with the Test Runs, like a count of all testcases with last status in Passed, ToDo, Executing, Failed, Aborted, Warning, Skipped (these are all our possible status flags).
I assume there is a way to create a new calculated measure for this and add it to the report?

Hello @thorsten,

Thanks for posting your question.

If you would like to display the last Test Run status, you can build the following report:

  • add Xray Requirement dimension to Rows, select “Requirement” level member

  • add Xray Test Run Status dimension to Columns, select “Status” level member

  • create new calculated measure “Xray Test count by last execution status” using the following formula:

-- from Community: https://community.eazybi.com/t/xray-test-plan-execution-status/1574/25
CASE WHEN
[Xray Test Run Status].CurrentMember.Level.Name = "Status"
THEN
--count tests by last execution status
Cache(NonZero(Count(
Filter(
  --itesrate throguh individual Tests
  Descendants([Xray Test].CurrentMember, [Xray Test].[Test]),
  --test has execution in report context
  [Measures].[Xray Tests with executions] > 0 AND
  Order(
    --iterate through execution statuses for a selected Test
    Filter([Xray Test Run Status].[Status].Members,
      [Measures].[Xray Tests with executions] > 0),
    --order statuses descending by execution date or test run creation date
    CoalesceEmpty(
      [Measures].[Xray Tests executed last date],
      [Measures].[Xray Test Runs created last date]),
    BDESC
    --name of the last execution matches the status in columns
  ).item(0) IS [Xray Test Run Status].CurrentMember
)))) 
ELSE
([Measures].[Xray Tests with executions],
[Xray Test Run Status].DefaultMember)
END
  • select this measure in your report

  • enable “Hide empty”

This report shows how many tests for each requirement have each status as their last execution status.

I hope this helps.

Best,
Marita from support@eazybi.com