Need help with integrating selenium automation scripts to JIRA for automated test run

Zahid May 21, 2018

We have selenium JAVA scripts on our systems, and test cases created in JIRA.

We want to integrate them both, and what we want to achieve is-

when a user clicks the 'Execute' button for a test case on JIRA, the selenium script should run, and after successful compilation, the results should get updated back in JIRA.

We have tried working with Zephyr, but it looks too complicated to configure.

Any help is very much appreciated.

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 20, 2020

Hello!

If you have REST API in your system with selenium Java scripts and this REST API can execute your selenium scripts, then you could use Power Scripts or any other scripting app to call this REST API.

I will provide a detailed example for the Power Scripts app.

You can do the following:

1. Create an issuetype called Test.

2. Create a transition for this issuetype called Execute.

3. Add a SIL post function for the Execute transition.

You can put a script like this into the SIL post function:

HttpRequest request;
HttpHeader authHeader = httpBasicAuthHeader("admin", "admin");
request.headers += authHeader; 
string si = httpGet("yourRestApiUrl", request);

You can find more information on how to make HTTP calls from SIL here.

This code will call your Rest Api. If your Rest Api will return a result then you can later put this result into a Jira field like this:

#{Your Custom Field Name} = si;

If your Rest Api does not return a result, then you can later call Jira Rest Api to update the test ticket.

Suggest an answer

Log in or Sign up to answer