Xray test executed filtering by Test Plan s Label

I need to obtain the count of Xray Test Executed of every Xray Test Plan with label “Sportbooks-Performance”. I’m using this Label as Pages, and project as Rows
I´m using eazy for jira and Xray.

Can you please help me?

Regards,
Gustavo

@gustavo_salvato
You would need the custom calculation to override the context as typically label would be linked to Issues not Test plan

Sum(
 --filter set of Test plans
 Filter(
  DescendantsSet([Xray Test Plan].CurrentMember,[Xray Test Plan].[Plan]),
  --Test Plan issue has selected Label
  DefaultContext((
   [Measures].[Issues created],
   [Issue].[Issue].GetMemberByKey(
     [Xray Test Plan].CurrentMember.KEY),
   [Label].CurrentHierarchyMember
  )) > 0 ),
 --sum up test executed runs ignoring Label assigned to Test Plan
 ([Measures].[Xray Tests executed],
 [Label].CurrentHierarchy.DefaultMember)
)

A similar formula is on this communication post.

Martins / eazyBI

Hi @martins.vanags ! thanks for your answer.
I used the example of Zane and yours, but it is not giving the right results.
If I search this by jql I have more than 60 results, I don´t know why!!!
I can give more details about the test executed.
We use Test plans (with the label mentioned), for each Test plan we have at least 1 test execution (could be more) and inside this test execution we have at least 1 (or more) test cases (executed or not) This test executed count is wich I need to obtein as result.
And now I have to add as Row (and Page) the Dimention “Time” to have a trasability of how test execution has increase during the filteer period of time.

Regards

Hi @martins.vanags can you help me?

Hi @gustavo_salvato,

Building analyses for testing always is a challenge as test, test executions, and test plans builds a complex structure with multiple relations to each other. Therefore each aspect ofthe building report should be through and understood how it relates to each of those entities.

When building reports with Xray-specific measures, data are grouped by values assigned to Test Execution issues (in case of execution and test run related measures) or values assigned to Test issues (for the measure “Xray Tests created”).

If data are not represented as you expect, you might consider several aspects.

  1. Not all the data are imported in eazyBI, data are limited by selected projects, could be limited by advanced import options, and in the case of Xray could be limited by tests run age (Xray Test Management).

  2. Test, Test Execution, and Test Plan could be linked to each other. It might be that some Tests are in a Test Plan but related Tests Execution is not in the same Tests Plan. In those cases, some tests runs might be left out (Xray Test Management).

  3. When using calculated measures that change report context (like counting executed tests by Test plan label), make sure to disable page option “Nonempty” on report pages.

Best,
Zane / support@eazyBI.com

Hi @zane.baranovska,
I checked all points you mentioned, and everything was fine. But… I noticed that the report is taking the Test Executed executed in the test Plan and not those (as I need) related & executed in the Test Execution.

Please, can you help me?

Regards.
Gustavo.

This is te report definition

{
“cube_name”: “Issues”,
“cube_reports”: [ {
“name”: “Sportbooks - Performance Test Executed”,
“folder_name”: “Sportbooks Testing Metric”,
“result_view”: “line_chart”,
“definition”: {“columns”:{“dimensions”:[{“name”:“Measures”,“selected_set”:[“[Measures].[Performance Test Executed]”],“members”:[]}]},“rows”:{“dimensions”:[{“name”:“Issue Type”,“selected_set”:[“[Issue Type].[Test Executed]”],“members”:[],“bookmarked_members”:[{“depth”:1,“name”:“Test”,“full_name”:“[Issue Type].[Test]”},{“depth”:1,“name”:“Sub Test Execution”,“full_name”:“[Issue Type].[Sub Test Execution]”},{“depth”:1,“name”:“Bug”,“full_name”:“[Issue Type].[Bug]”},{“depth”:1,“name”:“Test Set”,“full_name”:“[Issue Type].[Test Set]”},{“depth”:1,“name”:“Test Plan”,“full_name”:“[Issue Type].[Test Plan]”},{“depth”:2,“name”:“Bug”,“full_name”:“[Issue Type.By type].[Standard].[Bug]”},{“depth”:2,“name”:“Test Set”,“full_name”:“[Issue Type.By type].[Standard].[Test Set]”},{“depth”:2,“name”:“Test Plan”,“full_name”:“[Issue Type.By type].[Standard].[Test Plan]”}]},{“name”:“Time”,“selected_set”:[“[Time].[2022].[Q1 2022].[Jan 2022]”,“[Time].[2022].[Q1 2022].[Feb 2022]”,“[Time].[2022].[Q1 2022].[Mar 2022]”,“[Time].[2022].[Q2 2022].[Apr 2022]”,“[Time].[2022].[Q2 2022].[May 2022]”,“[Time].[2022].[Q2 2022].[Jun 2022]”,“[Time].[2022].[Q3 2022].[Jul 2022]”,“[Time].[2022].[Q3 2022].[Aug 2022]”,“[Time].[2022].[Q4 2022].[Dec 2022]”],“members”:[],“bookmarked_members”:[]}],“nonempty_crossjoin”:false},“pages”:{“dimensions”:[{“name”:“Project”,“selected_set”:[“[Project].[All Projects]”],“members”:[{“depth”:0,“name”:“All Projects”,“full_name”:“[Project].[All Projects]”,“drillable”:true,“type”:“all”,“drilled_into”:false,“expanded”:true},{“depth”:1,“name”:“Betslip and Offering Mantenance”,“full_name”:“[Project].[Betslip and Offering Mantenance]”,“drillable”:true,“key”:“BOM”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“Cashout”,“full_name”:“[Project].[Cashout]”,“drillable”:true,“key”:“CH”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“Feeds”,“full_name”:“[Project].[Feeds]”,“drillable”:true,“key”:“FEED”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“NA BETSLIP”,“full_name”:“[Project].[NA BETSLIP]”,“drillable”:true,“key”:“NABETSLIP”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“SATURN”,“full_name”:“[Project].[SATURN]”,“drillable”:true,“key”:“SATURN”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“Sports-Eagle”,“full_name”:“[Project].[Sports-Eagle]”,“drillable”:true,“key”:“EAG”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“Sports-FrontEnd”,“full_name”:“[Project].[Sports-FrontEnd]”,“drillable”:true,“key”:“SBFE”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“Sports-Omega”,“full_name”:“[Project].[Sports-Omega]”,“drillable”:true,“key”:“OME”,“parent_full_name”:“[Project].[All Projects]”},{“depth”:1,“name”:“UNIVERSAL BETSLIP”,“full_name”:“[Project].[UNIVERSAL BETSLIP]”,“drillable”:true,“key”:“UBS”,“parent_full_name”:“[Project].[All Projects]”}],“bookmarked_members”:[],“current_page_members”:[“[Project].[Betslip and Offering Mantenance]”,“[Project].[Cashout]”,“[Project].[Feeds]”,“[Project].[NA BETSLIP]”,“[Project].[SATURN]”,“[Project].[Sports-Eagle]”,“[Project].[Sports-FrontEnd]”,“[Project].[Sports-Omega]”,“[Project].[UNIVERSAL BETSLIP]”]},{“name”:“Time”,“duplicate”:true,“selected_set”:[“[Time].[Last 12 months]”,“[Time].[All Times]”],“members”:[{“depth”:0,“name”:“Last 12 months”,“full_name”:“[Time].[Last 12 months]”,“annotations”:{“group”:“Default”,“predefined”:“true”},“calculated”:true,“drillable”:true,“expanded”:true,“drilled_into”:true,“drill_level”:“[Time].[Month]”},{“depth”:0,“name”:“All Times”,“full_name”:“[Time].[All Times]”,“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:true,“drill_level”:“[Time].[Month]”},{“depth”:3,“name”:“Jan 2022”,“full_name”:“[Time].[2022].[Q1 2022].[Jan 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Feb 2022”,“full_name”:“[Time].[2022].[Q1 2022].[Feb 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Mar 2022”,“full_name”:“[Time].[2022].[Q1 2022].[Mar 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Apr 2022”,“full_name”:“[Time].[2022].[Q2 2022].[Apr 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“May 2022”,“full_name”:“[Time].[2022].[Q2 2022].[May 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Jun 2022”,“full_name”:“[Time].[2022].[Q2 2022].[Jun 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Jul 2022”,“full_name”:“[Time].[2022].[Q3 2022].[Jul 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Aug 2022”,“full_name”:“[Time].[2022].[Q3 2022].[Aug 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”},{“depth”:3,“name”:“Dec 2022”,“full_name”:“[Time].[2022].[Q4 2022].[Dec 2022]”,“drillable”:true,“parent_full_name”:“[Time].[All Times]”}],“bookmarked_members”:[],“current_page_members”:[“[Time].[2022].[Q1 2022].[Jan 2022]”,“[Time].[2022].[Q1 2022].[Feb 2022]”,“[Time].[2022].[Q1 2022].[Mar 2022]”,“[Time].[2022].[Q2 2022].[Apr 2022]”,“[Time].[2022].[Q2 2022].[May 2022]”,“[Time].[2022].[Q2 2022].[Jun 2022]”,“[Time].[2022].[Q3 2022].[Jul 2022]”,“[Time].[2022].[Q3 2022].[Aug 2022]”,“[Time].[2022].[Q4 2022].[Dec 2022]”]},{“name”:“Issue Type”,“duplicate”:true,“selected_set”:[“[Issue Type].[Bug]”,“[Issue Type].[Test]”,“[Issue Type].[Test Execution]”,“[Issue Type].[Test Plan]”,“[Issue Type].[Sub Test Execution]”,“[Issue Type].[Test Executed]”,“[Issue Type].[Technical_Bug]”],“members”:[{“depth”:0,“name”:“Test Executed”,“full_name”:“[Issue Type].[Test Executed]”,“calculated”:true}],“bookmarked_members”:[],“current_page_members”:[“[Issue Type].[Test Executed]”]},{“name”:“Label”,“selected_set”:[“[Label].[All Labels]”],“members”:[{“depth”:0,“name”:“All Labels”,“full_name”:“[Label].[All Labels]”,“drillable”:true,“type”:“all”,“expanded”:true,“drilled_into”:false},{“depth”:1,“name”:“Sportbooks-Performance”,“full_name”:“[Label].[Sportbooks-Performance]”,“parent_full_name”:“[Label].[All Labels]”}],“bookmarked_members”:[],“current_page_members”:[“[Label].[Sportbooks-Performance]”]}]},“options”:{“nonempty”:true},“view”:{“current”:“line_chart”,“maximized”:false,“line_chart”:{“area”:false,“swap_axes”:false,“data_labels”:true,“series_options”:{}},“table”:{“freeze_header”:true}},“calculated_members”:[]}
} ],
“calculated_members”: [{“dimension”:“Time”,“name”:“Last 12 months”,“format_string”:“”,“formula”:“Aggregate(\n [Time].[Month].DateMembersBetween(‘12 months ago’, ‘today’)\n)”},{“name”:“Technical_Bug”,“dimension”:“Issue Type”,“formula”:“\n([Issue Type].[Technical Bug] + \n[Issue Type].[Technical Bug NA]+ \n[Issue Type].[Technical Bug CAS]+ \n[Issue Type].[Technical Bug BW])”,“format_string”:“”},{“name”:“Test Executed”,“dimension”:“Issue Type”,“formula”:“\n[Measures].[Xray Tests with executions]\n”,“format_string”:“”},{“name”:“Performance Test Executed”,“dimension”:“Measures”,“formula”:“Sum(\n --filter set of Test plans\n Filter(\n DescendantsSet([Xray Test Plan].CurrentMember,[Xray Test Plan].[Plan]),\n --Test Plan issue has selected Label\n DefaultContext((\n [Measures].[Issues created],\n [Issue].[Issue].GetMemberByKey(\n [Xray Test Plan].CurrentMember.KEY),\n [Label].CurrentHierarchyMember\n )) \u003e 0 ),\n --sum up test executed runs ignoring Label assigned to Test Plan\n ([Measures].[Xray Tests executed],\n [Label].CurrentHierarchy.DefaultMember)\n)”,“format_string”:“”}]
}

@zane.baranovska @martins.vanags Please help!!!

Hi @gustavo_salvato,

The calculation is based on measures “Xray Tests executed”, which considers only completed tests.
If you would like to see all tests of Tests Execution (completed, in progress, and scheduled tests), you might want to use measures “Xray Tests with executions”.

Sum(
  --filter set of Test plans
  Filter(
    DescendantsSet([Xray Test Plan].CurrentMember,[Xray Test Plan].[Plan]),
    --Test Plan issue has selected Label
    DefaultContext((
      [Measures].[Issues created],
      [Issue].[Issue].GetMemberByKey(
      [Xray Test Plan].CurrentMember.KEY),
      [Label].CurrentHierarchyMember
    )) > 0 ),
  --sum up test executed runs ignoring Label assigned to Test Plan
  ([Measures].[Xray Tests with executions],
  [Label].CurrentHierarchy.DefaultMember)
)

Description of each Xrray measure is here: Xray Test Management

Best,
Zane / support@eazyBI.com

Hi @zane.baranovska , I tried it and It doesn´t work.
For example lets review the TestPlan OME-230


It says that have 1+68 test with executed ( I need to get Execution count)

But if I make a report for just one Test Plan that has the Label, I get that only has 35 executions…

image

Please I need to get the test executions count for this test plans filtering by Label :frowning:

Regards.
Gustavo

Hi @gustavo_salvato,

Xray measures “Xray test executesd” shows only completed executions (TO DO and IN PROGRESS are not counted in) and for those “Test Execution” issues with a selected label “Sports-Opega”. This leaves out all planned and in-progress executions and executions that have no or some other label.

To count test executions (runs) by a label of the Test Plan, you should use a calculated measure that changes the Lable dimension context and counts all executions (completed, scheduled and in progress).

In the report, you group and filter data also by Time dimension. Note how test runs are grouped (see the documentation Xray Test Management - Measures):

  • for completed test runs (has both execution dates “Started” and “Finished”), a date when a test run is finished,

  • for in-progress test runs (has “Started” date and no “Finished” date), a date when a test run is started,

  • for scheduled test runs (test run has no dates for execution “Started” and “Finished”.), a date when a test is added to a test execution.

Best,
Zane / support@eazyBI.com

1 Like

Hi Zane! you are really great! it works.

Thank you!!!

Regards,
Gustavo.

1 Like