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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

error: Missing data in the junit results import request

Edited
huaqin.xia
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!
Oct 09, 2023

Hi, I'm trying to import JUnit test result(report.xml) to a specific Test Execution ticket(already created before importing), but I always get {"error":"Missing data in the junit results import request"}, can you please help check and let me know what data is missing in the request?

The Junit test report(report.xml) contains 2 test results, both results contain the test_key(MYPRJKEY-17393 and MYPRJKEY-23474), which are the existing xray Test ticket in Jira.

The curl command I used is as following

curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer eyJhb***ffYmCoCLnI" -F "file=@report.xml" https://xray.cloud.getxray.app/api/v1/import/execution/junit?projectKey=MYPRJKEY&testExecKey=MYPRJKEY-12345

The bearer token is valid, MYPRJKEY is the project key, all the tickets in my project start with "MYPRJKEY-", and "MYPRJKEY-12345" is an existing Xray Test Execution ticket, and content of report.xml is as following

<testsuites id="" name="" tests="2" failures="0" skipped="0" errors="0" time="130.86764">
<testsuite name="component\testComponent.MainFile.spec.ts" timestamp="2023-10-10T01:38:43.964Z" hostname="chromium" tests="2" failures="0" skipped="0" time="128.405" errors="0">
<testcase name="MYPRJKEY-17393 Add Main file" classname="component\testComponent.MainFile.spec.ts" time="79.765">
<properties>
<property name="test_key" value="MYPRJKEY-17393">
</property>
</properties>
<system-out>
<![CDATA[Clicking disclaimer "accept" button
Clicked on the disclaimer "accept" button
Test document name: test_1111
addDocument test_1111
]]>
</system-out>
</testcase>
<testcase name="MYPRJKEY-23474 User Preference settings" classname="component\testComponent.MainFile.spec.ts" time="90.765">
<properties>
<property name="test_key" value="MYPRJKEY-23474">
</property>
</properties>
<system-out>
<![CDATA[Clicking disclaimer "accept" button
Clicked on the disclaimer "accept" button
set preference successfully
set preference successfully
set preference successfully
]]>
</system-out>
</testcase>
</testsuite>
</testsuites>

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events