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 ?
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
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
)
)
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:
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:
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.
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:
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.
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.