The results generated at Jenkins side never gets uploaded to Xray

A
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 23, 2024

we tested it and the following error occurred: Starting XRAY: Results Import Task...

##########################################################
#### Xray is importing the execution results ####
##########################################################
File found: /export/build/jenkins-localfs/workspace/estautomatisation-itcsweb_DevEnv/target/surefire-reports/TEST-Authorization tests.xml
Starting to import results from TEST-Authorization tests.xml
[Pipeline] echo
[[33mWARN[0m] Failed to trigger 'Xray JUnit Results' - will ignore 'Unable to confirm Result of the upload..... Upload Failed! Status:401 Response:<html><head> <title>Unauthorized (401)</title> <!--[if IE]><![endif]--><script type="text/javascript"> (function() { var contextPath = '/jira'; function printDeprecatedMsg() { if (console && console.warn) { console.warn('DEPRECATED JS - contextPath global variable has been deprecated since 7.4.0. Use `wrm/context-path` module instead.'); } } Object.defineProperty(window, 'contextPath', { get: function() { printDeprecatedMsg(); return contextPath; }, set: function(value) { printDeprecatedMsg(); contextPath = value; } }); })();

 

Can you help us? We tried it with a manual import of the file and it worked, although we also created the test execution manually.

1 answer

0 votes
Marc Koppelaar
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.
February 23, 2024

Hi @A 

The logs shows clearly a 401 error unauhthorized.

So there are issues on authorization.

Most likely issues is the the Xray license is not valid in Jira or the API token you are using is not valid.

Does the user that is used with the token able to access the project in Jira where you want to import the results on an issue and are the correct permissions granted

Or reach out to Xray support and request their help.

 

Suggest an answer

Log in or Sign up to answer