Quantcast
Channel: Gurock Software Support Forum
Viewing all articles
Browse latest Browse all 829

UI script to hide all test runs which don't have a 100% pass rate

$
0
0

Some of our automated test plans contain a large number of test runs (> 1000).

This UI script adds a button to the ^plan/view page which hides all the test runs which don't have a 100% pass rate.

This is useful if you've got a test plan with lots of test runs and only a few tests in a non-passed state (running a report is quite a long process if you only want a quick view of non-passed tests).

Works with TestRail version    4.0.4.3277

name: Hide 100% Passed test runs
description: Hide 100% Passed test runs
author: Matt Horrocks, Dell.
version: 1.0
includes: ^plans/view
excludes: 

js:
$(document).ready(
    function() {
        $("<a class='show-attention-required toolbar-button content-header-button button-view'>Show attention required</a>").insertBefore('.toolbar.content-header-toolbar a:last-child');
        $(".show-attention-required").click(
            function(e)
            {
                e.preventDefault();
                if ($(this).text() == "Show all"){
                    $(".chart-minibar-percent").each(function( index ) {
                            $(this).closest('tr').show();
                    });
                    $(".show-attention-required").text("Show attention required");
                } else if ($(this).text() == "Show attention required"){
                    $(".chart-minibar-percent").each(function( index ) {
                        if ($(this).html().indexOf("100%") >= 0){
                            $(this).closest('tr').hide();
                        }
                    });
                    $(".show-attention-required").text("Show all");
                }
            }
        );
    }
)

Viewing all articles
Browse latest Browse all 829

Trending Articles