I have the xUnitFileImport scheduled job configured in my polarion project (as described in Polarion documentation) to import e2e test results (formatted to JUnit test results)
<job cronExpression="0 0/5 * * * ? *" id="xUnitFileImport" name="Import e2e Tests Results" scope="system">
<path>D:\myProject\data\import-test-results\e2e-gitlab</path>
<project>myProject</project>
<userAccountVaultKey>myKey</userAccountVaultKey>
<maxCreatedDefects>10</maxCreatedDefects>
<maxCreatedDefectsPercent>5</maxCreatedDefectsPercent>
<templateTestRunId>xUnit Build Test</templateTestRunId>
<idRegex>(.*).xml</idRegex>
<groupIdRegex>(.*)_.*.xml</groupIdRegex>
</job>
This works and I get my test results imported into a new test run and new test cases are created. But if I run the import job multiple times (for each test run) it creates duplicate test case work items even though they have the same name, which leads to this situation:
Is there some way to tell the import job to reference the existing testcases to the newly created test run, instead of creating new ones?
What i have done so far:
- yes I checked that the "custom field for test case id" in the "testing > configuration" is configured
- yes I checked that the field value is really set in the created test case
- The current value in this field is e.g. ".Login" as i don't want the classnames in the report.
- YES I still get the same behaviour with the classname set
- In the scheduler I have changed the job parameter for the group id because it wasn't filled. New value is: <groupIdRegex>e2e-results-(.*).xml</groupIdRegex>
- I checked that no other custom fields are interfering, only the standard fields are set
- I checked that no readonly fields are present
- I do use a template for the testcases as supported by the xUnitFileImport. The testcases are successfully created and i don't see anything that would interfere
- However I do have a hyperlink set in the template (I'll try removing this soon™)
- I changed the test run template from "xUnit Build test" to "xUnit Manual Test Upload" this however did not lead to any visible change
- I changed the template status from draft to active. Had no change in behaviour.
- I tripple checked all the fields in the created test cases. They are literally the same, which leads to the conclusion that no fields in the testcases interfere with referencing to them
After all this time i have invested now, researching on my own and asking on different forums, I am ready to call this a polarion bug unless someone proves me this functionality is working.