Forums

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

How to update test run custom fields values using xray cloud API ?

Nivedita N June 5, 2023

I have a requirement to update the test run custom fields value using xray cloud API.

I want to know what will be the request payload for updating custom fields, currently, I am using the below request payload, but it's not working. I have been blocked for this issue for a week, please let me know what should be the request payload.

 

Getting error as  "error": "Result is not valid Xray Format".

 

XRAY Custom field.pngCustom Field Payload.png

1 answer

0 votes
Saurabh Kumar
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!
March 25, 2025

Please help, can custom field be updated at Junit xml report at testsuite block into Jira test execution instance.

For ex - here i listed in bold and it should update the Jira test execution field which corresponds to field customfield_12345

 

Sampe jira XMl report 

<?xml version='1.0' encoding='UTF-8' ?>
<testsuite name="com.xyz.RegressionTests" tests="40" failures="10" errors="0" skipped="1" time="8152.546" timestamp="2025-03-24T02:59:04" hostname="localhost">
<properties>
<property name="testrun_customfield:customfield_12345" value="Stocks"/>
<property name="device" value="Pixel" />
<property name="flavor" value="" />
<property name="project" value=":app" />
</properties>
<testcase name="verify_HSADetailsAllActivityOnlyPendingTransactionsETEFlow" classname="com.xyz.RegressionTests" time="39.257">

</testcase>
</testsuite>

 

 

At this moment when i try with this sample then everything works fine including uploading the test report from junit xml file into test execution instance of Jira with no error 

The only problem remains - the custom field values are not getting updated

 

i referred this doc to  come up with the approach 

https://docs.getxray.app/display/XRAYCLOUD/Taking+advantage+of+JUnit+XML+reports#TakingadvantageofJUnitXMLreports-Testruncustomfields

 

Appreciate if any one share more details around to identify the missing pieces   

 

Suggest an answer

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

Atlassian Community Events