Forums

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

Unable to generate Xray attributes in testng-resullts.xml file

Syed Mohammad Soban
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!
November 13, 2019

I am trying to import testng results in Jira.

 

Reference :::https://confluence.xpand-it.com/display/public/XRAY/Testing+using+TestNG+in+Java

Referenced testng-results.xml as below:

<?xml version="1.0" encoding="UTF-8"?>

-<testng-results passed="12" total="16" ignored="0" failed="4" skipped="0">

<reporter-output> </reporter-output>


-<suite finished-at="2018-03-07T14:42:27Z" started-at="2018-03-07T14:42:27Z" duration-ms="58" name="TestAll">

<groups> </groups>


-<test finished-at="2018-03-07T14:42:27Z" started-at="2018-03-07T14:42:27Z" duration-ms="25" name="calculatorA">


-<class name="com.xpand.java.CalcTest">


-<test-method finished-at="2018-03-07T14:42:27Z" started-at="2018-03-07T14:42:27Z" duration-ms="3" name="CanAddNumbers" signature="CanAddNumbers()[pri:0, instance:com.xpand.java.CalcTest@36d4b5c]" status="PASS">

<reporter-output> </reporter-output>


-<attributes>


-<attribute name="test">

-<![CDATA[CALC-2]]>
</attribute>

<!-- test -->

 

-<attribute name="requirement">

+<![CDATA[]]>
</attribute>

<!-- requirement -->

 

+<attribute name="labels">

-<![CDATA[core addition]]>
<!-- labels -->


</attributes>

 

 

................................................................................

My testng.results.xml sample as below:

 

<?xml version="1.0" encoding="UTF-8"?>
<testng-results skipped="0" failed="2" total="8" passed="6">
<reporter-output>
</reporter-output>
<suite name="Xray example tests" duration-ms="50" started-at="2019-11-13T08:52:12Z" finished-at="2019-11-13T08:52:12Z">
<groups>
</groups>
<test name="Xray tests" duration-ms="50" started-at="2019-11-13T08:52:12Z" finished-at="2019-11-13T08:52:12Z">
<class name="com.calc.test.CalcTest">
<test-method status="PASS" signature="setUp()[pri:0, instance:com.calc.test.CalcTest@5702b3b1]" name="setUp" is-config="true" duration-ms="7" started-at="2019-11-13T14:22:12Z" finished-at="2019-11-13T14:22:12Z">
<reporter-output>
</reporter-output>
</test-method> <!-- setUp -->
<test-method status="PASS" signature="CanAddNumbers()[pri:0, instance:com.calc.test.CalcTest@5702b3b1]" name="CanAddNumbers" duration-ms="12" started-at="2019-11-13T14:22:12Z" finished-at="2019-11-13T14:22:12Z">
<reporter-output>
</reporter-output>
</test-method> <!-- CanAddNumbers -->.

............................................................................No attributes generating in my pom.xml.

 

Same thing coming in working project from here :

https://jira.xpand-it.com/browse/XRAY-2411

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events