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

Adding multiple uniquely-named runs to a plan?


#1

I’m trying to use the API to add a large amount of runs in a single Post using its array function, but it doesn’t seem to actually want to accept the entirety of the “runs” section. It will take data from before it and create a single run with all the entries of a suite rather than multiple runs with specific test cases.

Here’s the body of my POST, so you fine folks can take a crack at it:

{
“suite_id”: 10394,
“include_all”: true,
“name”: “fakename”,
“description”: “fake description”,
“runs”: [
{
“include_all”: false,
“name”: “Test Thing (123)”,
“description”: “This is a thing for testing”,
“case_ids”: [12077339]
},
{
“include_all”: false,
“name”: “Test Thing (124)”,
“description”: “This is a thing for testing”,
“case_ids”: [12077340]
}
]
}

The guess I’m dreading is that TestRail’s API doesn’t support overriding names for individual test runs, which would make the entire API useless for what I’m attempting. My project typically has 100-300 runs for each test plan we do, and making dozens of sub-suites, individually selecting test cases/subsections on 300 checks, copying and pasting names and descriptions in after creating suites… is not ideal.

To further elaborate how I’m going about this, I created a tool in Excel to allow users to select sets of test cases organized by subsections, which then outputs the POST body you saw here. This should allow us to import the names/descriptions we’re making runs off from the database, then select subsections of our suites from dropdowns in order to compile the request.

Does anyone have advice for tackling this problem? It’s a massive time-sink of entry-level grunt work to do it in the actual site UI, which doesn’t have any intelligent support for adding multiple runs to a plan in a way that doesn’t make the user go insane from inanity.