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

Deleting a Test Run does not remove imported type 4 evidence attachments from the database and filesystem

    XporterXMLWordPrintable

Details

    • Bug
    • Status: Ready for Release
    • Major
    • Resolution: Unresolved
    • Xray DC 8.5.5
    • None
    • REST API
    • None
    • DC

    • UNCOVERED

    Description

      When a Test Run is created through the JUnit non-multipart import endpoint with evidence attached, Xray creates attachment records of types 0 and 4.

      However, when the corresponding Test Run is deleted, only the type 0 attachment records and files are removed.

      The type 4 attachments remain in the database and on disk, even though the associated Test Run no longer exists.

      Steps to Reproduce

      1. Prepare a JUnit XML report containing one test case with a testrun_evidence property and a single Base64-encoded ZIP attachment.
      2. Import the report using: POST /rest/raven/1.0/import/execution/junit
      3. Open the resulting Test Execution and identify the imported Test Run.
      4. Verify that attachment records of types 0 and 4 have been created in the database and on disk.
      5. Delete the Test Run using the Remove/Delete action in the Test Execution.
      6. Inspect the database attachment records and filesystem again.

      Actual Result

      • The Test Run is deleted.
      • Type 0 attachment records and corresponding files are removed.
      • Type 4 attachment records and corresponding files remain in the database and filesystem.
      • These remaining attachments appear to be orphaned after the Test Run deletion.

      Expected Result

      Deleting a Test Run should also remove all evidence attachments exclusively associated with that Test Run, including their database records and physical files.

      No unreferenced attachment data should remain after deletion.

      Impact

      • Orphaned attachments accumulate in the database and filesystem.
      • Disk usage continues to increase despite deletion of Test Runs.
      • Database and filesystem cleanup may be required to recover storage.
      • Long-term storage growth could become significant in environments with frequent automated execution imports.

      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: