Details
-
Bug
-
Status: Waiting Approval
-
Medium
-
Resolution: Unresolved
-
Xray Cloud 16.6.0
-
None
-
None
-
N/A
Description
NUnit import only works if the unstructured Test Type is named "Generic". If the project's Unstructured-kind Test Type has any other name, import fails with
{"error":"Couldn't find generic test type"}
Even when a valid Unstructured-kind Test Type exists on the project.
Steps to reproduce:
- Ensure the project's Unstructured-kind Test Type is not named exactly "Generic" (delete the original one and add a new Unstructured Test Type with a different name).
- Attempt an NUnit import for tests with no matching testKey (Xray needs to auto-create new Tests) using the following endpoint:
POST /api/v2/import/execution/nunit.
This can be done with the file and request below:
nunit_repro_generic_test_type_bug.xml
curl -H "Content-Type: text/xml" -X POST -H "Authorization: Bearer $token" --data @"nunit_repro_generic_test_type_bug.xml" "https://us.xray.cloud.getxray.app/api/v2/import/execution/nunit?testExecKey=\{key}"
Expected result:
- The Tests should be created using the highest-ranked Unstructured Test Type on the project (using the Test Type position on the Test Types screen).
- The error {"error":"Couldn't find generic test type"} should only be returned if the project doesn’t have any Unstructured Test Types.
Actual result:
- 400 Bad Request, {"error":"Couldn't find generic test type"}