Xray-App / xray-junit-extensions

Enhanced JUnit 5 integration with Xray Test Management for Jira
Eclipse Public License 2.0
16 stars 8 forks source link

properties element should only be added to testcases if needed #18

Closed bitcoder closed 2 years ago

bitcoder commented 2 years ago

The element is added always to the elements, even if there are no custom properties for the testcase.

currently it can generate an XML like this:

<testcase name="CanMultiply" classname="app.getxray.java.CalcTest" time="0" started-at="2022-07-06T10:59:22.233" finished-at="2022-07-06T10:59:22.234">
<properties>
</properties>
</testcase>

If no custom properties exist for the testcase, that element "" should not be added to the XML. The previous test would be reported as:

<testcase name="CanMultiply" classname="app.getxray.java.CalcTest" time="0" started-at="2022-07-06T10:59:22.233" finished-at="2022-07-06T10:59:22.234">
</testcase>
bitcoder commented 2 years ago

A workaround was provided instead to add a dummy property instead to not make the code too much complex.

<properties>
<property name="_dummy_" value=""/>
</properties>