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

Query on Test Status in Testrail using trigger automation



I’m running java tests with the java api bindings using the “Start Tests” Button on the TestRail UI.
Some of my tests should be passing but are giving different status of Failed/Blocked/Retest.
I haven’t modified the trigger.php other than the 3 fields at the top (TESTRAIL_API_ADDRESS, TESTRAIL_API_USER, TESTRAIL_API_PASSWORD)

Would the schema on the TestRail Database provide me any further information to investigate this?
Or is it a better solution to customise it rather than use the default behaviour provided by testrails trigger script?

Many thanks,


Hello Killian,

Thanks for your post! The trigger script we provide in our documentation is just an example and a starting point, and you would need to be sure to customize this to fit your needs. The example script just executes and adds random statuses to the tests within the run, and you would replace this with actual results when you customize/build your own trigger script.

That said, we typically don’t recommend this method, and most customers trigger their automated tests outside of TestRail either manually, scheduled or via a continuous integration system. They then use TestRail’s API to submit the test results to TestRail, and this is the recommended and most robust approach.

Hope this helps!



Thanks Marco,

Thanks for confirmation, I realised this in the meantime.
I was looking at the best posible solution.

So the way it’s implemented here is that a TestSuite class kicks off all the tests with setup and teardown methods in this class. If I understand you correctly, the best way would be to implement the testrail calls in this testSuite class so the add_results calls are applied from here.

Does that sound about right that the implementation?
If this question has been answered before i’d be happy to read previous responses.

Many thanks,


mgarcia!, Why the better way is executing test outside Testrail and not execute it from Testrail How did you get to this conclusion? Why did you say that is recommended? Please, I need to know to take a decision in my current project!