How to display Xray test, key and summary of the last test execution, version of the last test execution?

Hello,
I would like to display for a Xray test in a test plan:

  • the key and summary of the last test execution in which it has been executed
  • the version of the last test execution in which it has been executed
  • the comment of Xray test in the last test execution in which it has been executed.

Any idea?
Thanks in advance!
Regards

Hi @Fred.M,

You can create a new calculated measure in Measures that would show properties of the last Test Execution issues. The logic for calculation is to go through all related Test Executionissues and order them by execution date descending. Then show retrieve and show issue property, like issue name, fix version, status, etc. The expression might look like this:

CASE WHEN --inidividual tests on rows with exeution timestamp for selected report context
  [Xray Test].CurrentHierarchyMember.Level.Name = "Test" AND
  [Measures].[Xray Tests executed last timestamp] > 0
THEN
--find the lates Test Execution
Cache(Head(
  Order(
    Filter(
      --iterate throug all executions of a test
      DescendantsSet([Xray Test Execution].CurrentMember, [Xray Test Execution].[Execution]),
      [Measures].[Xray Test Runs] > 0 ),
      --order statuses by execution date descending
      [Measures].[Xray Tests executed last timestamp],
    BDESC),
  1
--get the Test Execution prooperty key and summary
).item(0)).GetCaption
||" Versions: "|| --concatenate the next piece of information
[Fix Version].[Version].getMemberNamesByKeys(
  Cache(Head(
    Order(
      Filter(
        --iterate throug all executions of a test
        DescendantsSet([Xray Test Execution].CurrentMember, [Xray Test Execution].[Execution]),
        [Measures].[Xray Test Runs] > 0 ),
        --order statuses by execution date descending
        [Measures].[Xray Tests executed last timestamp],
      BDESC),
    1
  --get the Test Execuiotn property fix version ids
  ).item(0)).Get('Fix version IDs')
)
END

This way using function Get() you can extra other properties of Test Execution.
More details on calculated measures and used functions are here:

Howevere, the option to import test run comments is not supported as comments are not well suited for grouping data.

Best,
Zane / support@eazyBI.com

Thank you @zane.baranovska. The expression you gave me work perfectly to get:

  • Test Execution prooperty key and summary
  • Test Execuiotn property fix version ids

But i get empty cells when using for exemple the expression below to get comments of Xray test in the last test execution in which it has been executed:


CASE WHEN --inidividual tests on rows with exeution timestamp for selected report context
  [Xray Test].CurrentHierarchyMember.Level.Name = "Test" AND
  [Measures].[Xray Tests executed last timestamp] > 0
THEN
[Fix Version].[Version].getMemberNamesByKeys(
  Cache(Head(
    Order(
      Filter(
        --iterate throug all executions of a test
        DescendantsSet([Xray Test Execution].CurrentMember, [Xray Test Execution].[Execution]),
        [Measures].[Xray Test Runs] > 0 ),
        --order statuses by execution date descending
        [Measures].[Xray Tests executed last timestamp],
      BDESC),
    1
  --get the Test Execuiotn property comments
  ).item(0)).Get('Comments')
)
END

Any idea?

Regards,
Fredia

HI @Fred.M,

In the calculated measure, you may address existing issue properties that are already imported in eazyBI. If the property is not available or it has no data for a particular issue (or Test, or Test Execution issue), then the result is empty.

Xray test run comment field is not supported for data import in eazyBI therefore calculation does not have any results.

Best,
Zane / support@eazyBI.com