Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

XRay - Jenkins pipeline support

Hi,

Is it planned to support Jenkins pipeline through XRay Jenkins plugin?

Also, is the source code for the XRay Jenkins plugin available somewhere? It would be convenient in order to configure the plugin (e.g. XrayInstance/ServerConfiguration; for the moment we have to inspect the .class files...) from Jenkins Groovy initialization (init.groovy.d)

Best regards,

Ludovic

2 answers

1 accepted

0 votes
Answer accepted

Hi Ludovic,

Currently it does not have support for pipeline, but we have plans to include this in the next release of the Jenkins plugin.
We have this Improvement already reported in our backlog, here.
Regarding the source code, we're sorry but it is not available. 

 

Best regards,

Xpand Add-ons Team

Thank you José!

Hi Ludovic, 

 

Xray Jenkins plugin now supports Jenkins pipeline.

 

Best Regards,

Diamantino Campos

Like Ludovic Cintrat likes this

Thank you for the news Diamantino.

Hi,

can we have a groovy script for Jira-Xray server configuration for Jenkins xray plugin . As of now we configure the jiraurl,username and pwd in Jenkins/configure page UI. Since xray plugin source code is not available , can you provide a groovy script to automate the configuration part.

Thanks,

Vishnu

Hello Vishnu,

please check the following documentation

https://confluence.xpand-it.com/display/XRAY/Integration+with+Jenkins

In this Documentation you will find some script examples.

But most importantly, I recommend you to use the Jenkins Snippet Generator. This generator will allow you to automatically generate your step script using the interface.

You will find an example on how to automatically generate your script at the end of the documentation page.

Best regards,

Xavier Fernandes.

Would be nice to get the response of the pipeline execution as result of the pipeline in order to get the created issue/s.

Example:

def result = [$class: 'XrayImportBuilder',
                    endpointName: '/junit',
                    fixVersion: 'A',
                    importToSameExecution: 'true',
                    projectKey: 'B',
                    serverInstance: 'XX-XX',
                    testEnvironments: 'C',
                    testPlanKey: 'D',
                    importFilePath: 'junit.xml']

echo result

And then get the json result like you can see in the log execution:

{"testExecIssue":{"id":"13699","key":"DEV-1067","self":"http://localhost:8080/rest/api/2/issue/13699"}}

I need this too. 

I'm struggling to find out how I can capture stdout from any jenkins step apart from the 'sh' step.

I need to import my gherkin test from git, then export them back to the slave to execute. However the export api requires a filter id or issue-key list. I only want to export the tests from the import step.

Any ideas?

So far the only workaround I see is to tag all your scenarios with an identifier and have a pre-canned JQL filter on that identifier.

Hi,

One way to easily integrate your automated tests is by using the JUnit XML output of your test runner.

We have some simple yet detailed tutorials explaining how to integrate several testing frameworks used in some programming languages, so you can see how automated tests are mapped from your code to Jira. I will leave it here

You can learn more about how JUnit reports are used with Xray in here.

If you still struggle with this issue, we think it's better for you to create a support ticket with us in order to have the best technical support!

 

Best regards,
Xray Team

Hi, 

I need to get this information too.

I see in my logs that the plugin return the response below : 

{"testExecIssue":{"id":"1180614","key":"xxxx-3056","self":"https://xxxxxx/rest/api/2/issue/1180614"}}

To update my new test execution (in the next stage) I need to get the key of this response. 

There is any update since the last answer (07/15/2019) ? 

 

Thanks a lot for your answer.

How to link the Test cases to a user story via jenkins.

Hello pavithraa_suji, 

Maybe you can use Jira Plugin, try to update your Jira in pipeline with this function : 

jiraEditIssue
 You have some example in this link : https://jenkinsci.github.io/jira-steps-plugin/steps/issue/jira_edit_issue/ 

# Look at IssueInput class for more information.
def testIssue = [fields: [ project: [id: '10000'],
summary: 'New JIRA Created from Jenkins.',
description: 'New JIRA Created from Jenkins.',
issuetype: [id: '3']]]

response = jiraEditIssue idOrKey: 'TEST-01', issue: testIssue, site: 'LOCAL'

echo response.successful.toString()
echo response.data.toString()


replace "TEST-01" by the id of your user story, and add your field to link the test case (try with :

issuelink : [name: 'TestCaseID-01']

but i'm not sure ).

 

Hope it helps !

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

128 views 3 15
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you