Defect count by Xray Defect Dimension and Output with assignment to dimension Business Process (Row in report)

Hello support team,

For the test and defect reporting we use eazyBI. Jira and xray provide the basic data.
I encountered 2 difficulties in determining the number of defects caused by the tests in the selected test plan. I could not solve them myself.

Contents 1 - Assignment of the measured variable to the business process:

I determined the measure “[Measures].[Xray Tests defect count]” based on the dimension “[Xray Test].CurrentHierarchyMember, [Xray Test].[Test]” and the assignment to the dimension “Business Process” (as Row) works in the report.

*** OK - Assignment to the business process for [Xray Test]** Anzahl Defekte GP ****
– annotations.group=Auswertung Geschäftsprozesse
Sum(
Filter(
Descendants([Xray Test].CurrentHierarchyMember, [Xray Test].[Test]),
[Measures].[Xray Tests created]>0
),
(
[Measures].[Xray Tests defect count],
[Geschäftsprozess].DefaultMember
)
)


*** NOK - Assignment to the business process for [Xray Test] ** Anzahl Defekte GP2 ****
– annotations.group=Auswertung Geschäftsprozesse
Sum(
Filter(
Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),
[Measures].[Xray Tests defect count]>0
),
(
[Measures].[Xray Tests defect count],
[Geschäftsprozess].DefaultMember
)
)


However, if I change the base dimension to ([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]), the assignment to the dimension “Business Process” (as Row) can be done in the report. The result is assigned to the value “None” (dimension “Business Process”).
The attribute “Business Process” is available for both dimensions [Xray Test] and [Xray Defect] and can be retrieved in the same way:

[Xray Test].CurrentHierarchyMember.get(‘Geschäftsprozess’)
[Xray Defect].CurrentHierarchyMember.get(‘Geschäftsprozess’)

Why does the assignment to the business process not work for [Xray Test] but for [Xray Defect]?

Report:

Contents 2 - Assignment of the measured variable to the business process:

For this reason, a measure was created that counts only the defects created in the tests for the selected test plan. The COUNT function was used here. This works well. However, the result cannot be distributed to the dimension “Business Process” (Row in the report). If assigned, the result is assigned the value “None”. No assignment to business process is probably due to the use of the base dimension [Xray Defect] instead of [Xray Test].

Guess correct? How can this work? What has to be changed?

[Measures].[Defekt Priorität]:


[Priority].[Priority].getMemberNameByKey(
[Xray Defect].CurrentHierarchyMember.get(‘Priority ID’)
)


[Measures].[Xray Defect status]:


[Status].[Status].getMemberNameByKey(
[Xray Defect].CurrentHierarchyMember.get(‘Status ID’)
)


[Measures].[Defekt Anzahl mit Priorität Blocker (Status nicht erledigt)]: (Measure for number of defects from tests for selected test plan)


NonZero(
count(
Filter(
Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect])
, [Measures].[Xray Tests defect count]>0
and [Measures].[Defekt Priorität]=‘Blocker’
and [Measures].[Xray Defect status] <> ‘Closed’
and [Measures].[Xray Defect status] <> ‘Resolved’
)
)
)


Measure for assignment to business process (previous measure is embedded):


Sum(
Filter(
Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),
[Measures].[Xray Tests defect count]>0)
,(
[Measures].[Defekt Anzahl mit Priorität Blocker (Status nicht erledigt)]
, [Geschäftsprozess].DefaultMember
)
)


Thanks for the support

Report definition to the Contents 1 - Assignment of the measured variable to the business process:

{
“cube_name”: “Issues”,
“cube_reports”: [ {
“name”: “Übersicht GP ULC DMP eazyBI-Support”,
“folder_name”: “Defekt Reports - Projekt ULC”,
“result_view”: “table”,
“definition”: {“columns”:{“dimensions”:[{“name”:“Measures”,“selected_set”:["[Measures].[Anzahl Defekte GP]","[Measures].[Anzahl Defekte GP2]"],“members”:[]}]},“rows”:{“dimensions”:[{“name”:“Geschäftsprozess”,“selected_set”:["[Geschäftsprozess].[First].Members"],“members”:[],“bookmarked_members”:[]}],“nonempty_crossjoin”:true},“pages”:{“dimensions”:[{“name”:“Xray Test Plan”,“selected_set”:["[Xray Test Plan].[All Xray Test Plans]"],“members”:[{“depth”:0,“name”:“All Xray Test Plans”,“full_name”:"[Xray Test Plan].[All Xray Test Plans]",“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:false},{“depth”:1,“name”:“IT Qualitätssicherung (ZTM)”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]",“drillable”:true,“key”:“IQZ”,“expanded”:true,“drilled_into”:false,“parent_full_name”:"[Xray Test Plan].[All Xray Test Plans]"},{“depth”:2,“name”:“IQZ-3240”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-3240]",“key”:“IQZ-3240”,“parent_full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]"},{“depth”:2,“name”:“IQZ-8024”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-8024]",“key”:“IQZ-8024”,“parent_full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]"}],“bookmarked_members”:[],“current_page_members”:["[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-3240]","[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-8024]"]}]},“options”:{“total”:“rows”},“view”:{“current”:“table”,“maximized”:false,“table”:{“cell_formatting”:{"[Geschäftsprozess].[Kündigung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Ablaufbearbeitung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Bestandsübertragung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Beitragsfreistellung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Teilkündigung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Provisionsabrechnung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Fondsswitch/ -shift]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Vertragsauskunft]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Wiederinkraftsetzung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Leistungsfall Tod]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Stammdatenänderung Vermittler]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Zahlläufe]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Ablaufmanagement]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Ablaufbearbeitung Riester]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[VN-Wechsel privat]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Dynamik]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Erhöhung]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Reduktion]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Zuzahlung]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Änderung Zahlweise]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Allgemeine Vertragsanpassung]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Beitragspause]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Rechnungswesen]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Riester Beitragsverrechnung]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Riester Jährliche Informationen (Statusreporte, Besch. §92 EStG, §94 EStG)]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Systemzugänge]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Tarifausschluss]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Wertmitteilung/Statusreport]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Zahlung steuern und abwickeln]":[{“background_color”:"#B5CA92"}]},“freeze_header”:false}}}
} ],
“calculated_members”: [{“name”:“Anzahl Defekte GP”,“dimension”:“Measures”,“formula”:"-- annotations.group=Auswertung Geschäftsprozesse\nSum(\n Filter(\n Descendants([Xray Test].CurrentHierarchyMember, [Xray Test].[Test]),\n [Measures].[Xray Tests created]\u003e0\n ),\n (\n [Measures].[Xray Tests defect count],\n [Geschäftsprozess].DefaultMember\n )\n)",“format_string”:""},{“name”:“Anzahl Defekte GP2”,“dimension”:“Measures”,“formula”:"-- annotations.group=DMP User defined\n\nSum(\n Filter(\n Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),\n [Measures].[Xray Tests defect count]\u003e0\n ),\n (\n [Measures].[Xray Tests defect count],\n [Geschäftsprozess].DefaultMember\n )\n )",“format_string”:""}]
}

Report definition to the Contents 2 - Assignment of the measured variable to the business process:

{
“cube_name”: “Issues”,
“cube_reports”: [ {
“name”: “Übersicht GP ULC DMP eazyBI-Support 2”,
“folder_name”: “Defekt Reports - Projekt ULC”,
“result_view”: “table”,
“definition”: {“columns”:{“dimensions”:[{“name”:“Measures”,“selected_set”:["[Measures].[Anzahl Defekte GP]","[Measures].[GP-Test Blocker - Defect]"],“members”:[]}]},“rows”:{“dimensions”:[{“name”:“Geschäftsprozess”,“selected_set”:["[Geschäftsprozess].[First].Members"],“members”:[],“bookmarked_members”:[]}],“nonempty_crossjoin”:true},“pages”:{“dimensions”:[{“name”:“Xray Test Plan”,“selected_set”:["[Xray Test Plan].[All Xray Test Plans]"],“members”:[{“depth”:0,“name”:“All Xray Test Plans”,“full_name”:"[Xray Test Plan].[All Xray Test Plans]",“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:false},{“depth”:1,“name”:“IT Qualitätssicherung (ZTM)”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]",“drillable”:true,“key”:“IQZ”,“expanded”:true,“drilled_into”:false,“parent_full_name”:"[Xray Test Plan].[All Xray Test Plans]"},{“depth”:2,“name”:“IQZ-3240”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-3240]",“key”:“IQZ-3240”,“parent_full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]"},{“depth”:2,“name”:“IQZ-8024”,“full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-8024]",“key”:“IQZ-8024”,“parent_full_name”:"[Xray Test Plan].[IT Qualitätssicherung (ZTM)]"}],“bookmarked_members”:[],“current_page_members”:["[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-3240]","[Xray Test Plan].[IT Qualitätssicherung (ZTM)].[IQZ-8024]"]}]},“options”:{“total”:“rows”},“view”:{“current”:“table”,“maximized”:false,“table”:{“cell_formatting”:{"[Geschäftsprozess].[Kündigung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Ablaufbearbeitung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Bestandsübertragung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Beitragsfreistellung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Teilkündigung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Provisionsabrechnung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Fondsswitch/ -shift]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Vertragsauskunft]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Wiederinkraftsetzung]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Leistungsfall Tod]":[{“background_color”:"#DA8D98"}],"[Geschäftsprozess].[Stammdatenänderung Vermittler]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Zahlläufe]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Ablaufmanagement]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Ablaufbearbeitung Riester]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[VN-Wechsel privat]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Dynamik]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Erhöhung]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Reduktion]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Zuzahlung]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Änderung Zahlweise]":[{“background_color”:"#92A8CD"}],"[Geschäftsprozess].[Allgemeine Vertragsanpassung]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Beitragspause]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Rechnungswesen]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Riester Beitragsverrechnung]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Riester Jährliche Informationen (Statusreporte, Besch. §92 EStG, §94 EStG)]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Systemzugänge]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Tarifausschluss]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Wertmitteilung/Statusreport]":[{“background_color”:"#B5CA92"}],"[Geschäftsprozess].[Zahlung steuern und abwickeln]":[{“background_color”:"#B5CA92"}]},“freeze_header”:false}}}
} ],
“calculated_members”: [{“dimension”:“Measures”,“name”:“Xray Defect status”,“format_string”:"",“formula”:"[Status].[Status].getMemberNameByKey(\n [Xray Defect].CurrentHierarchyMember.get(‘Status ID’)\n)",“annotations”:{“group”:“Xray”,“drill_through_dimension_levels”:"[Xray Test].[Test], [Xray Test Execution].[Execution]",“predefined”:true}},{“name”:“Anzahl Defekte GP”,“dimension”:“Measures”,“formula”:"-- annotations.group=Auswertung Geschäftsprozesse\nSum(\n Filter(\n Descendants([Xray Test].CurrentHierarchyMember, [Xray Test].[Test]),\n [Measures].[Xray Tests created]\u003e0\n ),\n (\n [Measures].[Xray Tests defect count],\n [Geschäftsprozess].DefaultMember\n )\n)",“format_string”:""},{“name”:“Defekt Priorität”,“dimension”:“Measures”,“formula”:"-- annotations.group=DMP Messgröße Basis \n\n[Priority].[Priority].getMemberNameByKey(\n [Xray Defect].CurrentHierarchyMember.get(‘Priority ID’)\n)\n",“format_string”:""},{“name”:“Defekt Anzahl mit Priorität Blocker (Status nicht erledigt)”,“dimension”:“Measures”,“formula”:"-- annotations.group=DMP User defined\n\nNonZero(\ncount(\n Filter(\n Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect])\n , [Measures].[Xray Tests defect count]\u003e0\n and [Measures].[Defekt Priorität]=‘Blocker’\n and [Measures].[Xray Defect status] \u003c\u003e ‘Closed’\n and [Measures].[Xray Defect status] \u003c\u003e ‘Resolved’\n )\n )\n)",“format_string”:""},{“name”:“GP-Test Blocker - Defect”,“dimension”:“Measures”,“formula”:"-- annotations.group=DMP User defined\n\n\nSum(\n Filter(\n Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),\n [Measures].[Xray Tests defect count]\u003e0)\n ,(\n [Measures].[Defekt Anzahl mit Priorität Blocker (Status nicht erledigt)]\n , [Geschäftsprozess].DefaultMember\n )\n)",“format_string”:""}]
}

Result:

Hi @Dockter73,

Thank you for report definitions to clarify the use case.

In Xray, all testing entities, like Test Plan, Test, Test Execution, Defect, and Requirement, are Jira issues. This is a handy setup and gives much freedom for managing tests in Xray as well to build reports. On the other hand, it is a brainer to understand how to address the field values of the right issue type (Test, Execution or Defect). In eazyBI, the core element is the measure that determines how dimensions are related to each other and measure itself. The measure is the treasure!

Most of the Xray specific measures represent data form perspective of Test Execution issues as executions if the point where all testing entities come together (data is built around test executions).
For example, measure “Xray Test Runs”, “Xray Tests executed”, and “Xray Tests defect count” to gather with dimension “Business Process” (Geschäftsprozess) represents the business process of Tests Execution issues.
On the other hand, measure “Xray Tests created” represents values of Tests; and eazyBI retrieves the Business Process (Geschäftsprozess) assigned to the Test issue. There is description on Xray specific measures:

Your approach to the calculated measure depends on from which issue type to take the Business Process for grouping data.

  1. The calculated measure “Anzahl Defekte GP” represents the aggregated amount of defects by the business process of the Test issue because tests are filtered by measure “Xray Tests created”

  2. The calculated measure “Anzahl Defekte GP2” represents the aggregated amount of defects by the business process of Test Execution issuen because defects are filtered by measure “Xray Test defect count”. You might want to use just predefined measure “Xray TestDefect count” instead of calculated measure.

  3. If you would like to get the count by the business process (Geschäftsprozess) of the Defect issue, then you might want to filter Xray Defects by their property “Business Process” matching selected business process on rows.

    Sum(
      --set of defects
      Filter(
        Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),
        --for each defect gets its property with Geschäftsprozess and checks if its matches the selected value on row
        CoalesceEmpty(
          [Xray Defect].CurrentHierarchyMember.get('Geschäftsprozess'),"(none)"
        ) = [Geschäftsprozess].CurrentHierarchyMember.Name
      ),
     --defect count ignoring which Geschäftsprozess is assigned to test execution
      ([Measures].[Xray Tests defect count],
      [Geschäftsprozess].DefaultMember)
    )
    

    When using this approach, deselect the option Nonempty as it might hide some rows with Business Process.

Best,
Zane / support@eazyBI.com

Hello Zane (eazyBI support team),

thanks for the quick response. I applied her solution. It works very well. Now the measure is correctly assigned to the business processes of the affected defects. The business process of the affected test case is not correct in the case described.

Sum(
  --set of defects
  Filter(
    Descendants([Xray Defect].CurrentHierarchyMember, [Xray Defect].[Defect]),
    --for each defect gets its property with Geschäftsprozess and checks if its matches the selected value on row
    
CoalesceEmpty(
      [Xray Defect].CurrentHierarchyMember.get('Geschäftsprozess'),"(none)"
    ) = [Geschäftsprozess].CurrentHierarchyMember.Name
  ),
 --defect count ignoring which Geschäftsprozess is assigned to test execution
  ([Measures].[Xray Tests defect count],
  
[Geschäftsprozess].DefaultMember)
)

In this context I have now encountered a new problem. While applying your solution, I noticed that only those elements are counted where the determined business process from “

CoalesceEmpty([Xray Defect].CurrentHierarchyMember.get('Geschäftsprozess'),"(none)") = Geschäftsprozess].CurrentHierarchyMember.Name

” is completely identical in value to the business process under Row.

This means that only those elements are counted where the main element is occupied by “Business Process” and its sub-element is empty. As soon as the main element and subelement is occupied by the attribute “Business Process”, it is not counted in the report, since the elements under Row are not identical at Level1 or Level2.

The value of the element according to their solution is formed with “-< subelement>” and compared with “”. If you switch to Level2 under Row in “Business Process” and press +, then the comparison is made with “”. For both comparison levels the comparison is negative.

GP-Defect-Count-only-Level1

Example for attribut „Geschäftsprozess“ – attribut is cascaded in Jira (“subelement” (Level2) is dependent on “mai element” (Level1))
• Main element (Level1):
• „Kündigung“
• Sub-element (Level2):

• „Abrechnung Kündigung“
• „Abrechnung Storno“
• „Kündigung, Gevo Rückkauf“
• „Kündigung, Gevo Wertstandsauskunft“

Actual values for „Geschäftsprozess“ – total count is 5:
• „Kündigung“: 4
• „Kündigung – Abrechnung Kündigung“: 0
• „Kündigung – Abrechnung Storno“: 0
• „Kündigung – Kündigung, Gevo Rückkauf“: 0
• „Kündigung – Kündigung, Gevo Wertstandsauskunft“: 1

With your solution there are 4 hits, where 5 are present. An element is not counted, because “Sub-element” is filled.

Is there a possibility with your solution to limit the value formed for comparison with Row to the “main element” (Level1) - independent of whether the “sub-element” (Level2) is also filled?

Thanks for the great support

Best regards
Sven Dockter