Forum Discussion

discombobulated's avatar
discombobulated
New Contributor
22 days ago
Solved

Coverage report filtering by issues and label?

Hi,

I'm trying to generate a coverage report for automated tests against user stories.
However, I need to filter both by jira issues and zephyr test cases.
Not all user stories will be covered by auto tests - we add an 'auto-test' (jira) label to the stories we want to cover.
Also, stories can be linked to both manual and auto tests cases - the auto test cases will have the 'auto-test' (zephyr) label.

So I can use the 'filter by issues' option to show coverage of the user stories selected for automated coverage, but that will include manual test cases which I want to filter out.

Or I can use the 'filter by label' which will show coverage of automated test cases, but this won't show any user stories selected for automation that have 0 coverage.

 

Is there a way to combine these filters, to show coverage of auto tests against user stories marked for automation, including stories with 0 coverage?

 

  • Hi,

    Zephyr report logic is contained in the URL when the report is generated.  Taking a look at how each URL is structured (for the reports you mentioned above) it seems possible to splice the two report criteria together to produce the results you need.  For example, inside each URL you can see how the criteria is built...

    Coverage report by label:
    tql=testResult.projectId%20IN%20(99999)%20AND%20testCase.labelName%20IN%20(%22AUTO-TEST%22)&epicJQL=&title=Coverage%20Report

    Coverage report by issues:
    tql=testResult.projectId%20IN%20(10165)&epicJQL=&title=Coverage%20Report

    Resulting change might be something like this:
    tql=testResult.projectId%20IN%20(99999)%20AND%20testCase.labelName%20IN%20(%22AUTO-TEST%22)&epicJQL=&title=Coverage%20Report

    I've tested that the spliced report generates (it does) but not whether the data displayed is correct.  Could you please let us know if this works for you?

3 Replies

  • Hi MisterB,

    Thanks for your reply - that worked a treat.
    Although I think there's a typo in your post - spliced url is the same as the first.

    Here's what worked for me (urls split for clarity)

    By Jira issue tag:

    tql=testResult.projectId%20IN%20(10006)&
    epicJQL=&
    title=Coverage%20Report&
    projectId=10006&
    traceabilityReportOption=COVERAGE_TEST_CASES&
    traceabilityTreeOption=COVERAGE_TEST_CASES&
    traceabilityCustomTreeDisplayOption=CONDENSED&
    traceabilityMatrixOption=COVERAGE_TEST_CASES&
    scorecardOption=EXECUTION_RESULTS&
    displayUnit=COUNT&
    period=MONTH&
    jql=labels%20%3D%20auto-test

    By Zephyr tag:

    tql=testResult.projectId%20IN%20(10006)%20AND%20
    testCase.labelName%20IN%20(%22Automation%22)&
    epicJQL=&
    title=Coverage%20Report&
    projectId=10006&
    traceabilityReportOption=COVERAGE_TEST_CASES&
    traceabilityTreeOption=COVERAGE_TEST_CASES&
    traceabilityCustomTreeDisplayOption=CONDENSED&
    traceabilityMatrixOption=COVERAGE_TEST_CASES&
    scorecardOption=EXECUTION_RESULTS&
    displayUnit=COUNT&
    period=MONTH

    Merged:

    tql=testResult.projectId%20IN%20(10006)%20AND%20
    testCase.labelName%20IN%20(%22Automation%22)&
    epicJQL=&
    title=Coverage%20Report&
    projectId=10006&
    traceabilityReportOption=COVERAGE_TEST_CASES&
    traceabilityTreeOption=COVERAGE_TEST_CASES&
    traceabilityCustomTreeDisplayOption=CONDENSED&
    traceabilityMatrixOption=COVERAGE_TEST_CASES&
    scorecardOption=EXECUTION_RESULTS&
    displayUnit=COUNT&
    period=MONTH&
    jql=labels%20%3D%20auto-test

     

  • MisterB's avatar
    MisterB
    Icon for Champion Level 3 rankChampion Level 3

    Hi,

    Zephyr report logic is contained in the URL when the report is generated.  Taking a look at how each URL is structured (for the reports you mentioned above) it seems possible to splice the two report criteria together to produce the results you need.  For example, inside each URL you can see how the criteria is built...

    Coverage report by label:
    tql=testResult.projectId%20IN%20(99999)%20AND%20testCase.labelName%20IN%20(%22AUTO-TEST%22)&epicJQL=&title=Coverage%20Report

    Coverage report by issues:
    tql=testResult.projectId%20IN%20(10165)&epicJQL=&title=Coverage%20Report

    Resulting change might be something like this:
    tql=testResult.projectId%20IN%20(99999)%20AND%20testCase.labelName%20IN%20(%22AUTO-TEST%22)&epicJQL=&title=Coverage%20Report

    I've tested that the spliced report generates (it does) but not whether the data displayed is correct.  Could you please let us know if this works for you?