All eazyBI for Jira eazyBI for Confluence Private eazyBI

Xray Test burnup for Test Plan
eazyBI for Jira

Overview

The following report examples are based on Xray Test Management integration. 

Xray Test Burnup for Test Plan report represents the accumulated amount of executed and not executed tests over time within a test plan. The timeframe and calculations are based on Begin date and End date of the test plan.

How to build it

Before creating the report, you should import test plan Begin date and End date as properties; those dates are used in further calculations. 

On pages is Xray Test Plan dimension to pick a test plan for the report. Selected value determines the timeline for the report and a set of tests for calculations.

On rows is Time dimension with selected Day level for data representation.

To display only days that are within a selected test plan, in Measures define a new calculated measure Time within Test Plan which returns value 1 for dates between begin and end date of the selected test plan. Set Time within Test Plan on columns and select option Filter rows which have value > 0. Then remove Time within Test Plan from the report, the filter will remain. The formula for Time within Test Plan is like this:

-- annotations.group=Xray User defined
CASE WHEN
  DateBetween([Time].CurrentHierarchyMember.StartDate,
    DateAddDays([Xray Test Plan].CurrentHierarchyMember.get('Begin Date'), -1),
    [Xray Test Plan].CurrentHierarchyMember.get('End Date') )
THEN 1
END

On columns are three new calculated measures Guideline for test executions, Cumulative count of executed tests, and Remaining count of tests not executed.

Guideline for test executions is calculated based on total test count within a Test Plan. This amount is spread evenly through all working days between Begin date and End date.

-- annotations.group=Xray User defined
CASE WHEN
  DateBetween([Time].CurrentHierarchyMember.StartDate,
    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),
    [Xray Test Plan].CurrentHierarchyMember.get('End Date') )
THEN
  --total tests created within Test Plan
  ( [Measures].[Xray Tests created],
  [Xray Test Type].DefaultMember,
  [Time].CurrentHierarchy.DefaultMember )
  /
  --total working days in Test Plan
  DateDiffWorkdays(
    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),
    DateAddDays(DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('End Date')), 1) )
  *
  --working days from the beginning of Test Plan
  DateDiffWorkdays(
    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),
    [Time].CurrentHierarchyMember.NextStartDate )
END

Cumulative count of executed tests represents the number of tests that are executed at least once at the given point of time, tests in execution, and scheduled tests are not counted in.

-- annotations.group=Xray User defined 
Sum(
  Filter(
    --iterate through tests created before or on selected date
    Descendants([Xray Test].CurrentHierarchyMember, [Xray Test].[Test]),
    DateCompare(
      DateWithoutTime([Xray Test].CurrentHierarchyMember.get('Created at')),
      [Time].CurrentHierarchyMember.StartDate) < 1 AND
    --for each tests validate whether it has been executed until this date
    DateBeforePeriodEnd(
      ([Measures].[Xray Tests executed first date],
      [Time].CurrentHierarchy.DefaultMember),
      [Time].CurrentHierarchyMember)
  ),
  ([Measures].[Xray Tests executed], 
  [Time].CurrentHierarchy.DefaultMember)
)

Remaining count of tests not executed represents the number of tests that are not executed at least once at the given point of time, including tests in execution and scheduled tests. This measure is the opposite to Cumulative count of executed tests and is calculated as the total test count within a Test Plan minus the count of tests that are executed at least once at the given point of time.

-- annotations.group=Xray User defined
([Measures].[Xray Tests created],
[Time].CurrentHierarchy.DefaultMember)
-
[Measures].[Cumulative count of executed tests]

You may also copy and import the report definition into your eazyBI account to get this report together with all calculated measures:

Report definition
{
  "cube_name": "Issues",
  "cube_reports": [ {
     "name": "Test Burnup for Test Plan",
     "result_view": "timeline_chart",
     "definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Cumulative count of executed tests]","[Measures].[Remaining count of tests not executed]","[Measures].[Xray Test Plan guideline for execution of tests]"],"members":[]}]},"rows":{"dimensions":[{"name":"Time","selected_set":["[Time].[Day].Members"],"members":[],"bookmarked_members":[]}],"filter_by":{"conditions":[{"expression":["[Measures].[Time within Test Plan]"],"operator":"\u003e","value":"0"}]},"nonempty_crossjoin":false},"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":"Pandas Go!","full_name":"[Xray Test Plan].[Pandas Go!]","drillable":true,"key":"PANDA","expanded":true,"drilled_into":false,"parent_full_name":"[Xray Test Plan].[All Xray Test Plans]"},{"depth":2,"name":"PANDA-74","full_name":"[Xray Test Plan].[Pandas Go!].[PANDA-74]","key":"PANDA-74","parent_full_name":"[Xray Test Plan].[Pandas Go!]"},{"depth":1,"name":"Shuttle Launch to Skylab Testing","full_name":"[Xray Test Plan].[Shuttle Launch to Skylab Testing]","drillable":true,"key":"SKY","expanded":true,"drilled_into":false,"parent_full_name":"[Xray Test Plan].[All Xray Test Plans]"}],"bookmarked_members":[],"current_page_members":["[Xray Test Plan].[Pandas Go!].[PANDA-74]"]}]},"options":{},"view":{"current":"timeline_chart","maximized":false,"timeline_chart":{"series_type":"spline","series_options":{"Xray Test Plan guideline for test executions":{"color":"#091E42","type":"line-Dash"},"Cumulative count of executed tests":{"color":"#0093B5"},"Remaining count of tests for executions":{"color":"#B31238"},"Cumulative Xray Test Runs":{"type":"area","color":"#FFBE60","separateAxis":1},"Remaining count of tests not executed":{"color":"#B31238"},"Xray Test Plan guideline for execution of tests":{"color":"#344563","type":"line-Dash"}},"show_full_caption":["Measures"]},"table":{}},"calculated_members":[],"description":"**Select a Test Plan.** A timeline is based on Test Plan **Begin date** and **End date**. For test plans without both dates, the report won't return any data.\n\nGuideline for test executions is calculated based on total test count within a Test Plan. This amount is spread evenly through all working days between Begin date and End date.\nCumulative count of executed tests represents the number of tests which are executed at least once at the given point of time (tests in execution and scheduled tests are not counted in)\nRemaining count of tests not executed is calculated total test count within a Test Plan minus the count of tests which are executed at least once at the given point of time."}
  } ],
  "calculated_members": [{"dimension":"Measures","name":"Xray Tests executed first date","format_string":"yyyy-mm-dd hh:nn:ss","formula":"TimestampToDate([Measures].[Xray Tests executed first timestamp])"},{"name":"Time within Test Plan","dimension":"Measures","formula":"-- annotations.group=Xray User defined\nCASE WHEN\n  DateBetween([Time].CurrentHierarchyMember.StartDate,\n    DateAddDays([Xray Test Plan].CurrentHierarchyMember.get('Begin Date'), -1),\n    [Xray Test Plan].CurrentHierarchyMember.get('End Date') )\nTHEN 1\nEND","format_string":""},{"name":"Xray Test Plan guideline for execution of tests","dimension":"Measures","formula":"-- annotations.group=Xray User defined\nCASE WHEN\n  DateBetween([Time].CurrentHierarchyMember.StartDate,\n    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),\n    [Xray Test Plan].CurrentHierarchyMember.get('End Date') )\nTHEN\n  --total tests created within Test Plan\n  ( [Measures].[Xray Tests created],\n  [Xray Test Type].DefaultMember,\n  [Time].CurrentHierarchy.DefaultMember )\n  /\n  --total working days in Test Plan\n  DateDiffWorkdays(\n    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),\n    DateAddDays(DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('End Date')), 1) )\n  *\n  --working days from the beginning of Test Plan\n  DateDiffWorkdays(\n    DateWithoutTime([Xray Test Plan].CurrentHierarchyMember.get('Begin Date')),\n    [Time].CurrentHierarchyMember.NextStartDate )\nEND","format_string":"#,##0.00"},{"name":"Cumulative count of executed tests","dimension":"Measures","formula":"-- annotations.group=Xray User defined \nSum(\n  Filter(\n    --iterate through tests created before or on selected date\n    Descendants([Xray Test].CurrentHierarchyMember, [Xray Test].[Test]),\n    DateCompare(\n      DateWithoutTime([Xray Test].CurrentHierarchyMember.get('Created at')),\n      [Time].CurrentHierarchyMember.StartDate) \u003c 1 AND\n    --for each tests validate whether it has been executed until this date\n    DateBeforePeriodEnd(\n      ([Measures].[Xray Tests executed first date],\n      [Time].CurrentHierarchy.DefaultMember),\n      [Time].CurrentHierarchyMember)\n  ),\n  ([Measures].[Xray Tests executed], \n  [Time].CurrentHierarchy.DefaultMember)\n)","format_string":"#,##0"},{"name":"Remaining count of tests not executed","dimension":"Measures","formula":"-- annotations.group=Xray User defined\n([Measures].[Xray Tests created],\n[Time].CurrentHierarchy.DefaultMember)\n-\n[Measures].[Cumulative count of executed tests]","format_string":""}]
}

See also