When uploading the junit xml test results against the already created generic tests for automated test cases, only the initial uploaded generic test cases are mapped always. Any updates to the generic test cases creates new tests and not updating the existing (even though the generic definitions are the same)
Creating Generic Tests in bulk from automated code base:
key Generic Test Definitions
T01 Test01.config01
T02 Test01.config02
T03 Test01.config03
Updating / Amending the Generic tests and re-uploading creates new test cases
key Generic Test Definitions
T04 Test01.config01
T05 Test01.config02
T06 Test01.config03
T07 Test01.config04 <- newly added
Further upload of test execution results always points to T01, T02,T03 and not to T04,T05,T06
What is the recommended approach to amend / update the generic test definitions?
Which Xray are you using? Server or Cloud?
And which method are you using, REST API or CSV Importer?
If you are using REST API, Xray does identify the Test cases, by the Test Definition, and only creates new ones if the user uploading the information is unable to view the existing issues.
If you are using CSV Importer, to update it identifies by the issue Key, so if you are using this method, the only thing that matters is the issue key. It is necessary to map the issue key during import so that it does update and does not create new ones.
If you need additional help, please contact the Xray Support (http://xraysupport.xpand-it.com ) so that we can request additional information and help further.
Kind regards,
Rogério Paiva [Xray Support Team]
Hi @Rogério Paiva - Xray Xporter I am facing similar problem as @sri
I am currently trying to import automated test results in XML format into a test plan in Xray that contains test cases of type 'manual' (not of type 'Generic'). I am using the following curl command for the import:
curl -s -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $TOKEN" --data @"$file" ${XRAY_BASE_URL}/api/v2/import/execution/junit?projectKey=XP&testPlanKey=$XRAY_TestPlanKey
The import completes successfully and creates an execution for the test plan. However, it results in duplicate test cases being created, rather than updating the existing test cases within the test plan. I get a warning message that says “ Test associated with test execution but not with Test plan” which implies the issueKeys are not getting mapped correctly
Here is an example of the XML test result file:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="" tests="2" failures="0" flakes="0" errors="0" skipped="0" time="168.441" hostname="localhost">
<testcase name="a_7_articles" classname="com.wsl.noom.NWExistingUserTestSuite" time="86.107">
<properties>
<property name="issuekey" value="XP-749"/>
</properties>
</testcase>
<testcase name="c_11_savedMealsTest" classname="com.wsl.noom.NWExistingUserTestSuite" time="82.334">
<properties>
<property name="issuekey" value="XP-766"/>
</properties>
</testcase>
</testsuite>
Is there anything I am missing in the process, or do I need to adjust my approach to ensure that the existing test cases are updated instead of duplicated? P.S. Using Cloud Xray
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.