Details
-
Bug
-
Status: Code Review
-
Major
-
Resolution: Unresolved
-
Xray DC 8.5.4
-
None
-
None
-
DC
Description
When attempting to delete evidence associated with individual Test Run Results using the Xray REST API, the request fails with an HTTP 400 error indicating that the evidence does not belong to the specified Test Run.
This issue can occur with evidence imported through JUnit results, where attachments are associated with individual Test Run Results rather than directly with the parent Test Run.
As a result, users are unable to delete the affected evidence through the REST API while preserving the associated Test Runs, potentially leading to increased storage consumption.
Steps to Reproduce
- Import JUnit test results containing evidence associated with individual Test Run Results.
- Retrieve the Test Run Results and identify an evidence attachment.
- Attempt to delete the attachment using the corresponding Test Run ID and attachment ID through the REST API: DELETE /rest/raven/2.0/api/testrun/{testRunId}/attachment/{attachmentId}
- Observe the API response.
Actual Result
The DELETE request fails with HTTP 400, indicating that the evidence does not belong to the specified Test Run, even though the attachment is associated with one of its Test Run Results.
The evidence remains unchanged and cannot be deleted through the API.
Expected Result
The REST API should allow users to delete valid evidence associated with either a Test Run or its individual Test Run Results, provided the evidence belongs to the specified Test Run and the user has the necessary permissions.
Workaround
There is currently no supported workaround for selectively deleting the affected evidence through the REST API while preserving the associated Test Runs.
Attachments
Issue Links
- is duplicated by
-
XDC-1338 Loading...