Hello,
We use Jira and Xray, we had a report where we use the MDX measure below, applied on a test plan level to get the latest execution only from Xray test executions (not repeated tests count).
The MDX measure works well, the only problem is when the test plan had many tests executions inside, then the report crashs and shows an error after a while.
Notice that we are filtering the report with a Jira custom field, that’s why we prefer using this MDX instead of the “Xray test plan overall execution” property that doesn’t filter.
I am thinking of filtering within the custom field from the MDX itself instead of adding it to the report rows, would it be possible that you provide some hints in the code below to get this filter done, or if any other suggestions instead please for this situation?
Thank you in advance!
-- annotations. Group=Xray User defined
CASE WHEN
[Xray Test Run Status].CurrentMember.Level.Name = "Status"
THEN --count tests by last execution status
Cache(NonZero(Count(
Filter(
--iterate throug all Tests
Descendants([Xray Test].CurrentMember, [Xray Test].[Test]),
[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 by execution date descending
DateParse(
Generate(
Tail(
--iterate through all dates when a Test was executed
Filter([Time].[Day].Members,
[Measures].[Xray Tests with executions] > 0
)).Item(0),
Format([Time].CurrentHierarchyMember.StartDate, 'yyyy-mm-dd'),
",")),
BDESC
--name of the last execution matches status in columns
).item(0) IS [Xray Test Run Status].CurrentMember)
)))
ELSE --total count of tests with executions
([Measures].[Xray Tests with executions],
[Xray Test Run Status].DefaultMember)
END
Related: Xray Test plan execution status - Questions & Answers - eazyBI Community