All eazyBI for Jira eazyBI for Confluence Private eazyBI

Zephyr Test burnup for Test Plan
eazyBI for Jira

Overview

The following report examples are based on Zephyr Test Management for Jira integration. 

Zephyr 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 the planned start and end dates of Test Cycles in the Test Plan.

How to build it

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

First, you should calculate the planned timeline for the Test Plan. The calculations are based on the planned start and planned end dates of Test Cycles in the Test Plan. In Measures, define a new calculated measure Test Plan planned start date that finds the earliest planned start date among the Test Cycles. Set measure formatting to date.

-- annotations.group=Zephyr User defined
Order(
  Filter(
    Descendants([Zephyr Test Cycle].CurrentMember,[Zephyr Test Cycle].[Test Cycle]),
    (
      [Measures].[Zephyr Executions],
      [Time].CurrentHierarchy.DefaultMember
    ) > 0
  ),
  [Zephyr Test Cycle].CurrentMember.Get('Zephyr Test Cycle planned start date'),
  BASC
).Item(0).Get('Zephyr Test Cycle planned start date')

--set measure formatting to Date

Create another calculated measure Test Plan Planned end date that finds the latest planned end date among the Test Cycles. Set measure formatting to date.

-- annotations.group=Zephyr User defined
Order(
  Filter(
    Descendants([Zephyr Test Cycle].CurrentMember, [Zephyr Test Cycle].[Test Cycle]),
    (
      [Measures].[Zephyr Executions],
      [Time].CurrentHierarchy.DefaultMember
    ) > 0
  ),
  [Zephyr Test Cycle].CurrentMember.Get('Zephyr Test Cycle planned end date'),
  BDESC
).Item(0).Get('Zephyr Test Cycle planned end date')

--set measure formatting to Date

On the rows is the Time dimension with the selected Day level for data representation. You might want to add future dates to the Time dimension to show a complete timeline.

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 the planned start and end dates of the selected test plan. Set the Time within Test Plan on columns and select the 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=Zephyr User defined
CASE WHEN
  DateBetween(
    [Time].CurrentHierarchyMember.StartDate,
    DateAddDays([Measures].[Test Plan planned start date], -1),
    [Measures].[Test Plan Planned end date]
  )
THEN
  1
END

In the report columns, there 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 the total test count associated with a Test Plan. This amount is spread evenly through all working days between the planned start and end dates.

-- annotations.group=Zephyr User defined
CASE WHEN
  DateBetween(
    [Time].CurrentHierarchyMember.StartDate,
    [Measures].[Test Plan planned start date],
    [Measures].[Test Plan Planned end date]
  )
THEN
  --total tests created within Test Plan
  (
    [Measures].[Zephyr Test Cases with Test Cycles],
    [Time].CurrentHierarchy.DefaultMember
  )
  /
  --total working days in Test Plan
  DateDiffWorkdays(
    [Measures].[Test Plan planned start date],
    DateAddDays([Measures].[Test Plan Planned end date], 1)
  )
  *
  --working days from the beginning of Test Plan
  DateDiffWorkdays(
    [Measures].[Test Plan planned start date],
    [Time].CurrentHierarchyMember.NextStartDate
  )
END

Cumulative count of executed tests represents the number of tests that are executed at least once at a given point in time; tests in execution, and scheduled tests are not counted in. Set measure formatting to Integer.

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

--set measure formatting to Integer

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 in time.

-- annotations.group=Zephyr User defined
(
  [Measures].[Zephyr Test Cases with Test Cycles],
  [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": {"calculated_members":[],"columns":{"dimensions":[{"members":[],"name":"Measures","selected_set":["[Measures].[Cumulative count of executed tests]","[Measures].[Remaining count of tests not executed]","[Measures].[Guideline for execution of tests]"]}]},"description":"Test Plan Planned start date is calculated as the earliest start date among Cycles.\nTest Plan Planned end date is calculated as the latest end date among Cycles.","options":{},"pages":{"dimensions":[{"bookmarked_members":[],"current_page_members":["[Zephyr Test Plan].[Rhubarb].[RHUB-P3 Guitar prototype]"],"members":[{"depth":0,"drillable":true,"drilled_into":false,"expanded":true,"full_name":"[Zephyr Test Plan].[All Zephyr Test Plans]","name":"All Zephyr Test Plans","type":"all"},{"depth":1,"drillable":true,"drilled_into":false,"expanded":true,"full_name":"[Zephyr Test Plan].[Rhubarb]","key":"RHUB","name":"Rhubarb","parent_full_name":"[Zephyr Test Plan].[All Zephyr Test Plans]"},{"depth":2,"full_name":"[Zephyr Test Plan].[Rhubarb].[RHUB-P3 Guitar prototype]","key":"RHUB-P3","name":"RHUB-P3 Guitar prototype","parent_full_name":"[Zephyr Test Plan].[Rhubarb]"}],"name":"Zephyr Test Plan","selected_set":["[Zephyr Test Plan].[All Zephyr Test Plans]"]}]},"rows":{"dimensions":[{"bookmarked_members":[],"members":[],"name":"Time","selected_set":["[Time].[Day].Members"]}],"filter_by":{"conditions":[{"expression":["[Measures].[Time within Test Plan]"],"operator":"\u003e","value":"0"}]},"nonempty_crossjoin":false},"view":{"current":"timeline_chart","maximized":false,"timeline_chart":{"series_options":{"Cumulative count of executed tests":{"color":"#0093B5"},"Guideline for execution of tests":{"type":"line-Dash"},"Remaining count of tests for executions":{"color":"#B31238"},"Remaining count of tests not executed":{"color":"#B31238"}},"series_type":"spline","show_full_caption":["Measures"]},"table":{}}}
  } ],
  "calculated_members": [{"dimension":"Measures","name":"Zephyr Execution first date","format_string":"yyyy-mm-dd hh:nn:ss","formula":"TimestampToDate([Measures].[Zephyr Test Cases executed first timestamp])"},{"name":"Time within Test Plan","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\nCASE WHEN\n  DateBetween([Time].CurrentHierarchyMember.StartDate,\n    DateAddDays([Measures].[Test Plan planned start date], -1),\n    [Measures].[Test Plan Planned end date] )\nTHEN 1\nEND","format_string":""},{"name":"Guideline for execution of tests","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\nCASE WHEN\n  DateBetween([Time].CurrentHierarchyMember.StartDate,\n    [Measures].[Test Plan planned start date],\n    [Measures].[Test Plan Planned end date])\nTHEN\n  --total tests created within Test Plan\n  ([Measures].[Zephyr Test Cases with Test Cycles],\n  [Time].CurrentHierarchy.DefaultMember )\n  /\n  --total working days in Test Plan\n  DateDiffWorkdays(\n    [Measures].[Test Plan planned start date],\n    DateAddDays([Measures].[Test Plan Planned end date], 1) )\n  *\n  --working days from the beginning of Test Plan\n  DateDiffWorkdays(\n    [Measures].[Test Plan planned start date],\n    [Time].CurrentHierarchyMember.NextStartDate )\nEND","format_string":"#,##0.00"},{"name":"Cumulative count of executed tests","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\nSum(\n  Filter(\n    --iterate through tests created before or on selected date\n    Descendants([Zephyr Test Case].CurrentHierarchyMember, [Zephyr Test Case].[Test Case]),\n    DateCompare(\n      DateWithoutTime([Zephyr Test Case].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].[Zephyr Execution first date],\n      [Time].CurrentHierarchy.DefaultMember),\n      [Time].CurrentHierarchyMember)\n  ),\n  ([Measures].[Zephyr Test Cases executed], \n  [Time].CurrentHierarchy.DefaultMember)\n)\n\n--set measure formatting to Integer","format_string":"#,##0"},{"name":"Remaining count of tests not executed","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\n([Measures].[Zephyr Test Cases with Test Cycles],\n[Time].CurrentHierarchy.DefaultMember)\n-\n[Measures].[Cumulative count of executed tests]","format_string":""},{"name":"Test Plan planned start date","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\nOrder(\n  Filter(\n    Descendants([Zephyr Test Cycle].CurrentMember,[Zephyr Test Cycle].[Test Cycle]),\n    ([Measures].[Zephyr Executions],\n    [Time].CurrentHierarchy.DefaultMember) \u003e 0),\n  [Zephyr Test Cycle].CurrentMember.Get('Zephyr Test Cycle planned start date'),\n  BASC\n).Item(0).Get('Zephyr Test Cycle planned start date')\n\n--set measure formatting to Date ","format_string":"mmm dd yyyy"},{"name":"Test Plan Planned end date","dimension":"Measures","formula":"-- annotations.group=Zephyr User defined\nOrder(\n  Filter(\n    Descendants([Zephyr Test Cycle].CurrentMember,[Zephyr Test Cycle].[Test Cycle]),\n    ([Measures].[Zephyr Executions],\n    [Time].CurrentHierarchy.DefaultMember) \u003e 0),\n  [Zephyr Test Cycle].CurrentMember.Get('Zephyr Test Cycle planned end date'),\n  BDESC\n).Item(0).Get('Zephyr Test Cycle planned end date')\n\n--set measure formatting to Date","format_string":"mmm dd yyyy"}]
}

See also