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

Posting to index.php?/api/v2/add_results_for_cases/298 returned an error!


#1

We have a Jenkins server running Testrail plugin version, 1.0.7-SNAPSHOT

The plugin was installed with instructions from https://github.com/jenkinsci/testrail-plugin

When a Test suite is run, we export the test run XML with Testrail “export to XML” wizard.
Then, we run a Jenkins build to send the results TestRail.

In the Jenkins log for the Build, we see an ‘Error pushing results to TestRail’.
A snippet of the log is produced below.

How do we fix this error?

Regards, John

Test Cases:
Continuous Integration Regression Testing: dashboard page testing
Continuous Integration Regression Testing: analytics page testing
Continuous Integration Regression Testing: buckets&objects page testing
Continuous Integration Regression Testing: users&groups page testing
Continuous Integration Regression Testing: cluster page testing
Continuous Integration Regression Testing: alert page testing
Continuous Integration Regression Testing: admin page testing
Continuous Integration Regression Testing: help page testing
Munging test result files.
Scanning /tmp/jenkins6784297439662791722tmp
processing jenkins6784297439662791722tmp
Uploading results to TestRail.
Error pushing results to TestRail
Posting to index.php?/api/v2/add_results_for_cases/298 returned an error! Response from TestRail is:
{“error”:“Field :results cannot be empty (one result is required)”}
Build step ‘TestRail Plugin’ marked build as failure


#2

Hi Jandoh,

Thanks for your post! This plugin is built by a third party, and we don’t have any direct experience working with or using this plugin. It looks as though the error response that TestRail provides mentions that the result field isn’t included with the API request. So this is likely either a formatting error with the request or another issue with the plugin. I would recommend creating an issue directly with the plugin developer for help troubleshoot this. Hope this helps!

Regards,
Marco