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

get_cases by IDs or project


#1

Hi,

I am wondering if there is an easy way to use get_cases with test case IDs. That is, I am looking for a way to perform bulk retrieval of test case information using multiple IDs, rather than having to call get_case multiple times for each test case ID.

Alternatively, is there a way to get metadata information about all the test cases in a project without specifying a suite?

Thanks,

Jordan


#2

Regarding searching by test case IDs — apparently there’s no such thing.

Regarding all cases in a project — well, according to the API docs both suite and section are optional. Additionally there are a few more search parameters, so maybe that helps you accomplish what you need.


#3

Thanks for the info! Unfortunately, I am operating in a multi-suite environment, so to the best of my understanding, the suite-id field is mandatory.


#4

Did you try the get_cases request without suite id? I have a feeling it should work


#5

I will certainly look into it. I appreciate the help.


#6

Unfortunately that did not work out.


#7

Sad to hear. And I’m already anticipating Tobias or Dennis advising you to switch to single-suite mode :slight_smile:


#8

Hi all! :smile:

The suite ID is required in multi-suite mode and you can get a list of suites via get_suites. The section ID is optional is both cases and can be used to filter the result based on section(s).

Regards,
Tobias


#9

Hello!

Is there any plan to add either of the two features listed above for multi-suite mode?


#10

Hello Jordan,

For the multi-suite mode, you would need to call get_cases separately for each test suite. You can simply get a list of test suites via get_suites and you would be able to get all cases by iterating through your test suites and calling get_cases for each suite.

Regards,
Tobias


#11

Hi,
I want to add new test run every time when ever i run the test scripts through automation. for this i have used add run method. even though i am using valid project ID, i am getting the error"APIError: TestRail API returned HTTP 400 (“Field :project is not a valid ID.”)"