Uploaded image for project: 'Xray for Jira Cloud'
  1. Xray for Jira Cloud
  2. XRAYCLOUD-6785

While importing results via REST API, no error is thrown despite wrong Status in the JSON

    XporterXMLWordPrintable

Details

    • XRAYCLOUD 2024 Sprint 4
    • UNCOVERED

    Description

      Description: 

      When we import Execution Results via REST API with the wrong status, a 200 OK status is shown. But, no result gets imported. If we import the same results via UI, the results are imported, but, the issues with the wrong Status get imported with "TODO" status.

      How to reproduce

      1. Import Test Execution results via REST API, say, POST /api/v1/import/execution.
      2. Import the same results via UI for comparison
      3. Use the following JSON body: 
        {
            "testExecutionKey": "TESTEXEC-1",
            "tests": [
                {
                    "testKey": "TEST-1",
                    "status": "XYZ"
                },
                { 
                     "testKey": "TEST-2",
                     "status": "PASS"
                },
                { 
                     "testKey": "TEST-3",
                     "status": "FAIL"
                }
             ]
        }

      Actual result/Attachments:

      200 OK status is shown, but, no results get imported.

      Expected result:

      The REST API should either throw an error stating the wrong status or import results with Tests with "TODO" like UI.

      Attachments

        Activity

          People

            eduardo.eiras@sngular.com Eduardo Eiras
            jayanthi.murthi Jayanthi Murthi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: