Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting status code 401 when trying to upload results of test execution to xray through mvn command.

Kajol Singh
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!
May 2, 2022

I am trying to import the test execution results from a testng-results.xml in target/surefire-reports folder of maven project through maven command :

eclipse-project-folder>mvn com.xpandit.xray:xray-maven-plugin:xray

but I am getting this error :

01:57:08.957 [main] DEBUG com.xpandit.xray.service.impl.delegates.UploadResponseResolverDelegate - Status Code of Request:401
01:57:08.959 [main] ERROR com.xpandit.xray.service.impl.delegates.UploadResponseResolverDelegate - Upload Failed! Status:401
01:57:08.960 [main] ERROR com.xpandit.xray.service.impl.delegates.UploadResponseResolverDelegate - Response:Basic authentication with passwords is deprecated. For more information, see: https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/

in the pom.xml file i am provding my jira credentials under properties tag :

<properties>

<xray.jiraURL>https://xraypoctesting.atlassian.net</xray.jiraURL>
<xray.resultsFormat>TESTNG</xray.resultsFormat>
<xray.username>myusername@gmail.com</xray.username>
<xray.password>PIEN5QeaH0FaZuhif2zXA85C</xray.password>
<xray.projectKey>SEM</xray.projectKey>
<xray.testPlanKey>SEM-3</xray.testPlanKey>
<xray.fixVersion>V1.0</xray.fixVersion>
<xray.surefire.location>${basedir}/target/surefire-reports</xray.surefire.location>

</properties>

for password i have used atlassian jira api token, but still getting this authentication error. Can you pls help here!

0 answers

Suggest an answer

Log in or Sign up to answer