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

Usage of basic testrail API


#1

Hey

I am new to using the testrail APIs. I am using python to run the send. post command but am running into this error
testrail.APIError: TestRail API returned HTTP 400 (“Field :case_id is not a valid test case.”)

This is what I am using
result = self.client.send_post(
‘add_result_for_case/111111/22222’,
{‘status_id’: 1, ‘comment’: ‘This test worked fine!’}
)


#3

Hello !

Are you sure to refer to the correct run ID (RXXXXX) and case ID (CXXXXX) ?

This section of the documentation can clarify what kind of ID you must use.


#4

Its working. Turns out I was using the incorrect ids


#5

Hi Saurabh,

Thanks for the update, and glad you were able to get this working! Just let us know in case you run into any further issues with this.

Regards,
Marco