How to get execution status of test cases which are present under user story?

Hi,

I’m trying to get the status of each test case associated with a user story, but it seems there is no direct link to get it.
Test associated to user stories can be obtained by applying this solution: How to get number of test cases which are present under user story?, but execution status seems to be correlated with a test cycle execution and I’m struggling to find a solution.
Any idea where to start ?

thanks in advance,
HDLP

Hi @HDLP,

You are on the right track by importing the linked test keys. Further, you can get those members from the Xray Test dimension (GetMembersByKeys()) and sum various measures for them, e.g. Xray Test Runs; drilled by Xray Test Execution Status

Here is the formula I used in the example above:

Sum(
  [Xray Test].[Test].GetMembersByKeys(
    [Measures].[Linked tests]
  ), 
    (
      [Measures].[Xray Test Runs], 
      [Issue].CurrentHierarchyMember.DefaultMember
    )
)

Lauma / support@eazybi.com

Hi Lauma,

Your solution seems to make all sense, and it clarifies how to get the test status from the linked tests, however, I do not have Xray dimensions.
I’m using Zephir, and therefore I believe I need to getMembersByKeys from [Zephir Test Status] dimension but I’m not sure as it seems to fail somewhere

Sum(
[Zephyr Test Status].GetMembersByKeys(
[Measures].[Linked tests]
),
(
[Measures].[Zephyr Tests with executions],
[Issue].CurrentHierarchyMember.DefaultMember
)
)

Hi @HDLP,

Sorry for assuming you are on Xray!
You are close with the Zephyr formula, but it would be slightly different as the data model is different. Please try the following:

Sum(
  [Issue].[Issue].GetMembersByKeys(
    [Measures].[Issue Linked Tests]
  ), 
  [Measures].[Zephyr Tests with executions]
)

Lauma / support@eazybi.com

Hi Lauma,

Thanks for the support and my apologies for the delay in replying back.
Unfortunately your suggestion doesn’t work as it always returns empty, like it was not possible to get the relation.

I can obtain the list of “test case” issues associated to the user story when trying:

> SetToStr(
  [Issue].[Issue].GetMembersByKeys(
    [Measures].[Issue Linked Tests]
  )
)

And using the count function is possible to obtain the total number of test cases associated to the US.

Count(
  [Issue].[Issue].GetMembersByKeys(
    [Measures].[Issue Linked Tests]
  )
)

Same can be also obtained using

Nonzero(Count([Issue].CurrentHierarchy.GetLinkedmembers('Tests')))

I believe this is a bit more complex to identify the status of the test execution, due to the fact the test case can be part of more than one test cycle. In this sense it seems, “Test Cycle” dimension needs to be added to Pages to reduce the filtering. However, I’m still unable to get the status of the execution.

Not sure if this is the best solution. But at least it seems to work as expected:


Count(
 Filter(
   [Issue].[Issue].GetMembersByKeys([Issue].CurrentHierarchyMember.Get('Tests')),
   [Measures].[Zephyr Test last execution status] = "PASS")
  )

Hi @HDLP,

The formula you wrote is not incorrect, but it would give you only the tests with the last PASS execution status.
If you would remove the ‘Nonempty’ button from above the rows and also add the Zephyr Test Status dimension, you should see the count of issues in all their past statuses as well with the previous formula:

Let me know if that helped or if you have further questions regarding this!
Kind regards,

Hi Lauma,

Unfortunately I’m unable to make your example work. I always get empty results regardless of removing or not the “NonEmpty” button. Probably because each user story has more than one test case associated and eazybi is unable to differentiate the different status of the related test cases.

For now the solution I’ve mentioned overcomes the problem, even though as you somehow mentioned a formula for all the other statuses were also needed.

The problem that I foresee is more related with the [Measures].[Zephyr Test last execution status].

Since, this does not change according to the selected Test Cycle. Meaning it does not work with Test Cycle as a page and therefore this solution is useless the moment the test case is re-executed
https://docs.eazybi.com/eazybijira/data-import/data-from-jira-and-apps/zephyr-squad-test-management-for-jira

Hi @HDLP,

Is there a reason you do not want to use Zephyr specific dimension “Zephyr Requirement” to represent issues covered by tests?
When you import Zephyr (Squad) data, eazyBI creates a set of Zephyr-specific dimensions and measures that work together for testing data analytic.

  • “Issue” dimension represents Tests
  • “Zephyr Requirement” dimension represent issues covered by Tests
  • “Zephyr Defect” dimension represents issues registered during testing.
  • “Zephyr Test Cycle” dimension represent testing Cycles

You can use mentioned dimension with zephyr specific measure “Zephyr Tests executed count” and dimension “Zephyr Test Status” to see the testing results of all test executions (See picture below). You can also Drill into dimension “Zephyr Test Status” to see results by status (here is now to do this: Drill into measure by another dimension level ).

Importing issue links is a workaround if those “out-of-the-box” dimensions do not work for your use case.

Regarding “Zephyr Test last execution status”, it is a property for a test issue and represents the latest execution status over all cycles, requirements, and versions. In other words, it is a fixed value that does not change with report context (what you have on rows, columns, or page filters). To get value responding report context, you might want to use predefined measures, not properties.
More details on available dimensions and measures are here: Zephyr Squad Test Management for Jira - eazyBI for Jira.

Best,
Zane / support@eazyBI.com