user2336878
user2336878

Reputation: 31

Trigger a Jenkins build from TestRail

I am trying to trigger a Jenkins build from TestRail, a test case management software. To my knowledge, these two software don't formally support each other. But TestRail does have a JS/CSS editor that allows the user to customize their UI. I was hoping to be able to implement a button that would be able to trigger the build in Jenkins. But it turns out, the editor cannot interpret HTML.

If anyone already went through this process, can you please point me to the right direction?

Upvotes: 3

Views: 6807

Answers (1)

Dennis G.
Dennis G.

Reputation: 2287

one of the TestRail developers here. You can trigger automated tests from within TestRail and you would use the following approach:

  • Add a button to TestRail's user interface using UI Scripts. You can use JavaScript/jQuery to inject any custom buttons/HTML code as needed: http://docs.gurock.com/testrail-integration/custom-uiscripts

  • Your custom button would point to a custom server-side script that you need to write. The server-side script would actually trigger your Jenkins build (as this wouldn't be possible from JavaScript)

  • Your automated tests would use TestRail's API to submit the test results back to TestRail: http://docs.gurock.com/testrail-api/start

Please note that most teams simply execute/trigger their automated tests outside of TestRail instead, e.g. together with a daily build or similar.

Update: we also have a full code example on how to trigger automated tests from TestRail on our website here now:

http://docs.gurock.com/testrail-custom/automation-trigger

Upvotes: 6

Related Questions