Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-11762

Unable to Delete Test Run Result Evidence Using the REST API

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Code Review
    • Major
    • Resolution: Unresolved
    • Xray DC 8.5.4
    • None
    • REST API
    • None
    • DC

    • UNCOVERED

    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

      1. Import JUnit test results containing evidence associated with individual Test Run Results.
      2. Retrieve the Test Run Results and identify an evidence attachment.
      3. 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}
      4. 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

          Activity

            People

              joana.fonseca Joana Fonseca
              goncalo.nunes Gonçalo Nunes
              Votes:
              5 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: