Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Disable test cases in test suite


#1

Hi Tobias,

I have 40 test cases in my test suite and i am thinking of not running few tests. Is there a way i can disable the test cases from the test suite? I don’t want to delete the test cases because in future i may need to run.

Thanks,
Sara


#2

Hi Sara,

Thanks for your posting! You can simply change the case selection (per test run/plan) and wouldn’t need to include all cases of the repository. This looks as follows:

(see “Select specific test cases”)

I hope this helps!

Cheers,
Tobias


#3

Thanks for the response!!! I disabled test cases in test run but it’s still showing when i create dynamic test run. Is there a way i can disable the test cases from the dynamic test run i’m creating from c# nunit tests?

private int CreateTestRunSmallSet(string environment, string testType)
{
string runID = “”;

        if (testType.Equals("SmallSet"))
        {

            var data = new Dictionary<string, object>
            {
                {"suite_id", 2122},
                {
                    "name",
                    DateTime.Now.ToString("yyyy-MM-dd") + "  " + DateTime.Now.ToShortTimeString() +
                    "  High priority SmallSet " + environment
                },
                {"include_all", true},
             };


            try
            {

                String sAPIMethod = "add_run/8";
                JObject p = (JObject) testRailClient.SendPost(sAPIMethod, data);
                //Console.WriteLine("Current Run ID " + p["id"].ToString() + "...........");
                runID = p["id"].ToString();
            }
            catch (APIException e)
            {
                Console.WriteLine(e.StackTrace);
            }

        }

        return Convert.ToInt32(runID);
    }

#4

Hi Sara,

Yes, you can control this with the include_all option and case ID list (case_ids) and that’s the same behavior as in the UI:

http://docs.gurock.com/testrail-api2/reference-runs#add_run

(see “Request example”)

I hope this helps!

Cheers,
Tobias