"Zephyr with JIRA" integration with Selenium

Mohan V May 24, 2015

Hi ,

 

We are using Zephyr with JIRA for test case management. And uploaded test cases into them. There are more than 1000 test cases. My Objective here is to use Selenium(Java) and Automate these test cases in such a way that:

 

  1. The corresponding test case execution in Selenium needs to be triggered from JIRA
  2. The corresponding result (Pass / fail) needs to be returned and updated in Zephyr
  3. In case of defects, the defects needs to be created automatically

 

Pls let me know, anyone have implemented or tried this approach…

5 answers

1 accepted

3 votes
Answer accepted
Mohan V May 25, 2015

Thx Alexander for the reply. My main doubt is:

I have 100 test cases in Zephyr. I have 100 test scripts in Selenium. I am executing these test scripts through Jenkins as you said. So how I will map the test script result to test case in Zypher? Once the mapping is done, as you said, I can use the ZAPI and update the test result.

Pls clarify.

Alexander Penev [ByteSource] May 25, 2015

Hi, To do this use an own Annotation with a value JIRA_KEY and so we mark the tests with this annotation and are able to map it back when we process the results. Currently we just support whole tests, not steps . So in the final execution you see the whole tests is executed but not the executions of the single steps. If this is an issue for you, you could think of the following mapping: one class per test case, one step per method. If the test fails you could process the stack trace and find out which method failed and put the execution of this step as failed as the whole test. All steps/methods before are green and all methods after are unexecuted.

Mohan V May 25, 2015

Thx Alexander. I will try this and let you know, if I need more details. Thx for the information you provided....

Giovani Silva July 27, 2018

Is there any update about it? I'm having the same issue with my setup. I'm using cucumber with jenkins + zephyr enterprise. I have noticed the steps are going empty to zephyr.

Like ritu sharma likes this
2 votes
Arun Ravindran March 29, 2017

Hi All

Please follow the instructions in the link below to integrate Selenium with Zephyr for JIRA using ZAPI

https://support.getzephyr.com/hc/en-us/articles/204713195-Integrate-Selenium-JUnit-and-ANT-with-Zephyr-for-JIRA-and-ZAPI

For more information on ZAPI -> https://marketplace.atlassian.com/plugins/com.thed.zephyr.zapi/server/reviews

Thanks

ZephyrSupport

Veenu Gogia October 14, 2018

Hi,

 

Can we map test cases without using Python script as in the above link, attached code is in Python script where the user is passing API's.

0 votes
Jinit Shah June 23, 2020

Hi Alex, 

We have a use cases where:

1. Our Test Automation frameworks are in Python and integrated with Jenkins and GIT based CI / CD Pipeline.

2. We are looking for a way to execute the pipeline from Zephyr and get test results written back to Zephyr and in turn Jira ticket/ user story.

Do we already have some APIs / Methods to achieve the above use case?

Thanks,

Jinit

0 votes
Ola Akinola June 6, 2018

Hi Alexander

 

Im having the same issues. I desire the ability to:

 

1) Start a test cycle and update the test cases.

 

How would I do this in Java, please provide the sample code. 

 

Thanks,

Ola

Pinky Verma January 16, 2019

Hi Alexander,

 

 Can you share guide or document where we could follow the steps and do this configuration.

please help.

Regards,

Pinky

Ramesh Kumar January 17, 2020

Hi Alex,

We are using Zephyr  for Jira ver 7.13.0. So far we are running manual test cases.  We would like to download Zapi and Integrate the following. Could you please provide us any documentation for setting up the Framework and configuration.

Zephyr for Jira  - Test Management

Selenium with Maven-  Automation Test Scripts & Test Execution

Jenkins - Test Build

 

Thanks, 

Ram

 

0 votes
Alexander Penev [ByteSource] May 25, 2015

Hi Mohan,

We have implemented the following scenario for our customers:

  • Selenium tests are written in Java (TestNG) 
  • Executed by Jenkins (Acceptance Test Build)
  • The results of the run are written back to Zephyr:
    • a new test cycle is created
    • The test cycle is associated to adhoc or a particular version (defined in Jenkins by a Env Variable which you must maintain in Jenkins)
    • All the tests are associated with the cycle (over a predefined JQL filter, it could be that not all tests are implemented and executed, therefore we add them by a filter)
    • The executions are run into the above cycle
    • If there are errors, the Java stacktrace is stored in the execution comments
    • Currently missing is the step of creating bugs on failures but it is actually not a big issue. Maybe you should think once again about: "do I want 1000 bugs in my JIRA when the Test system is not available". If you still decide for this I would recommend you the following approach:
      • Make a smoke test suite which tests the major functionality
      • If this smoke tests suite is successful then run the rest and create issues automatically but also with some threshold or something

That what I describe above is all implemented with plain JAVA an ZAPI. If you are interested we could implement it for you, if you want to do it yourself, just tell me what are your showstoppers and I will try to support you on it

devender kumar February 1, 2016

i need a piece of code how to create project, test plan, test cases in JIRA using java 

Arun Ravindran March 29, 2017

Hi All

Please follow the instructions in the link below to integrate Selenium with Zephyr for JIRA using ZAPI

https://support.getzephyr.com/hc/en-us/articles/204713195-Integrate-Selenium-JUnit-and-ANT-with-Zephyr-for-JIRA-and-ZAPI

For more information on ZAPI -> https://marketplace.atlassian.com/plugins/com.thed.zephyr.zapi/server/reviews

Thanks

ZephyrSupport

Achu Sasidharan Pillai April 4, 2018

Hi Alexander,

It would be great if you can help me to integrate Zephyr for JIRA with Selenium(java).

How to build the bridge between Selenium and JIRA for updating the test results in Zephyr. Please assist me to solve this.

Appreciate your assistance here.

Regards,

Achu S Pillai

Alexander Penev [ByteSource] April 4, 2018

Hi Achu,

 

As I wrote above, we have build an integration layer for this integration using the public API of Zephyr. I already explained the basic architecture of our integration. 

How can I support you further?

 

Regards,

Alex

Achu Sasidharan Pillai April 4, 2018

Thanks for the response Alex,

I am new to API so it would be great if you can help with java code for connecting JIRA and selenium.

Regards,

Achu

Mustapha OUSIKIS October 19, 2018

Hello Alexandre,

Hope you are doing well,

As i'm beginner, can you help me ?

I need a simple example to connect my TentNG / selenium weeb driver (JAVA) with ZAPI for jira cloud.

Where can I implemented the the output report to zephyr ?

I'm using TestNG and i dont like use Junit ANT.

 

Thank you for your help.

Javid March 27, 2019

Hi Alex,

It is throwing exception for:

ZFJCloudRestClient.restBuilder(zephyrBaseUrl, accessKey, secretKey, userName).build();

and at the end the testng message at this point is:

java.lang.NoClassDefFoundError: org/apache/commons/configuration/PropertiesConfiguration

 

Could you please help

Suggest an answer

Log in or Sign up to answer