0

I wrote a Jenkins pipeline with stages that represent individual test case scenarios. I want to import the test results from jenkins console output for each of the tests(stages) as a test into xray test plan. I'm new to xray so trying to figure out the best way to do this and also if its possible. I'm not seeing a way to do this unless I have a different jenkins pipeline for each test.

Referenced this document - https://docs.getxray.app/display/XRAY420/Integration+with+Jenkins

arthi
  • 193
  • 4
  • 17
  • Are you using the Cloud version or the Server/DC version of Jira+Xray? And what type of reports are you trying to import (Junit, Xunit, etc)? – Cristiano Cunha Feb 22 '23 at 18:05
  • Using the Server/DC version of Jira+Xray. I'm trying to see if we can use the log(console output) from the jenkins run to export into xray. – arthi Feb 22 '23 at 18:41

1 Answers1

0

Depending on the testing framework/tool you are using you should be able to create a test report as an output of the test execution. Those reports can be an XML, Json or other type of file and those are the files we use to import the results into Xray (check the supported format here: https://docs.getxray.app/display/XRAY/Import+Execution+Results+-+REST).

To integrate with Jenkins please check here: https://docs.getxray.app/display/XRAY/Integration+with+Jenkins, you will find explanation on how to use the plugin in Jenkins in the UI or as code to import those results back into Xray. You can find code samples here: https://github.com/Xray-App/tutorial-jenkins-pipeline for the different ways you can integrate with Jenkins.

My suggestion is to generate a test result file as an output of the test execution and import those files into Xray, this will allow you to have multiple tests executed in one Jenkins job generating multiple test results files that can imported in several API calls.

Cristiano Cunha
  • 381
  • 1
  • 3
  • Thanks Cristiano very helpful information. Will give these suggestions a go and update this ticket with which solution that worked. – arthi Feb 23 '23 at 14:20