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

Adding test results with API (Problem)


#1

Anyone understand the error at the bottom? I am able to see suite ID’s, run ID’s but when I try adding a result to the run/case, I get error: no callback for type “status_id”

Thanks

-bash-3.2$ curl -H “Accept: application/json” “http://****/testrail/ … y=********” {“suites”:[{“id”:821,“name”:“TTS”,“description”:null,“project_id”:19},{“id”:822,“name”:“TTS1”,“description”:null,“project_id”:19}],“result”:true}-bash-3.2$

-bash-3.2$ curl -H “Accept: application/json” “http://****/testrail/ … y=********”
{“runs”:[{“id”:1110,“name”:“daily-Fri Jan 4 14:51:56 EST 2013”,“description”:null,“suite_id”:821,“milestone_id”:null,“config”:null,“is_completed”:0,“completed_on”:null,“passed_count”:1,“blocked_count”:0,“untested_count”:9,“retest_count”:0,“failed_count”:0,“project_id”:19,“plan_id”:null}],“result”:true}-bash-3.2$

-bash-3.2$ curl -H “Accept: application/json” -d “status_id=1” “http://****/testrail/ … y=********”
{“result”:false,“error”:“Internal error: no callback for type “status_id”.”,“inline”:true}-bash-3.2$


#2

A related issue may be that for some reason when I use get_cases, I get nothing in return as well, even though there are testcases in the suites I have built.


#3

Hello,

Thanks for the feedback. The API version you are using is newer than the TestRail version you have installed. Please update TestRail to 2.7 to use the API files you have (or downgrade to an older API version).

I hope this helps.

Regards,
Dennis


#4

Hi Dennis, thanks for the reply. We are using v2.3.2.931. I am awaiting an upgrade eventually from IT but I do need to get this finished. Can I get the correct API package for the version we are using at some location?

Thanks,
Mike


#5

Hello Mike,

Thanks for the update. I’m afraid we no longer support the API for your version of TestRail so you would need to update your TestRail installation first in order to use the API (to TestRail 2.6/2.7). Updating TestRail is very simple and usually takes just a few minutes and we are happy to help in case you have any questions. Documentation about updating TestRail can be found here:

http://docs.gurock.com/testrail-admin/installation-upgrading

Regards,
Tobias