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

Using TestRail API to trigger AS400 initialization jobs


Using the TestRail api in Java I wanted to trigger the initialization jobs in AS400 and submit the job details like Job Number, UserID and Job Name. I was successfull in doing this using JT400 jar taking out the job details and also submitting the details to the TestRail server to the test case using the TestRail API in java.

But the above process demands my Eclipse application(perspective) to remain open till the jobs are submitted.

I wanted to submit the jobs using my application and there should be a script running at the back end which could automatically submit the job status in TestRail server even if my application is closed once it has been triggered.
I have read that there is also an API on TestRail server side which can trigger some application.
But it demands knowledge in HTML,CSS,PHP. If this can solve my purpose to trigger the jobs from TestRail Server, then I am ready to read the basics of these(HTML,CSS,etc.). In that case please suggest how can I add a button in testrail UI to trigger the jobs by executing my executable jar file.


Hello Alok,

Thanks for your posting! We usually recommend triggering tests outside of TestRail as this would be most flexible option. You can then submit your test results via TestRail’s API and the Java binding. Often times, test automation tools generate a small output file with the test results etc. and one common approach is to post-process this file and submit the test results via TestRail’s API. An alternative is to hook into the test automation process and submit results as they are added.

I hope this helps!



Thanks for the reply. Yes Initially I have created a small application which triggers tests outside the TestRail and submits the results via TestRail Java api.
Just raised the question to verify whether it is any better alternative like running PHP script in TestRail which can check the AS400 server job status in background.
But I got my answer that the better alternative would be what I did before, as you have already suggested.


Hello Alok,

That’s good to hear and please let me know in case anything else comes up!



Hello Tobias,

Sure…I will let you know if I am stuck anywhere…



Hi Alok,

Great to hear that, we are happy to help in this case :slightly_smiling: