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

As system, I support the NUnit format when importing execution results

    XporterXMLWordPrintable

Details

    • NOTRUN

    Description

      Xray must provide support for NUnit XML format when importing execution results.

      https://confluence.xpand-addons.com/display/XRAY/Taking+advantage+of+NUnit+XML+reports

      Xray should support both NUnit v2.6 and v3.0 XML reports.

      In NUnit, you have Tests, Parameterized Tests, (Test) Suites and TestFixtures, among other things.

      • A Test is a test case.
      • Parameterized Tests are a way of specifying input values for a given Test (similar to an example in a Cucumber Scenario Outline).
      • A Suite is a way of aggregating a group of tests for running.
      • A TestFixture corresponds to a "class" containing multiple Tests.

      Test Cases are imported to Xray’s Generic Test issues. For NUnit 3.0, the “classname” and “methodname” attributes are concatenated and mapped to the Generic Test Definition field of the Generic Test.

      If a Test already exists with the same Generic Test Definition, then it is not created again.

      Test Cases are imported to a new (or a user-specified) Test Execution in the context of some project, along with their respective execution results.

      Parameterized Tests are imported to the same Test Run, where each set of parameters is identified by a different context.

      NUnit’s Test Suites are not mapped to any special entity. However, the execution details screen will show the Test Suite related to a specific test result.

      Mapping of fields from the report to the Test issue

      NUnit XML report Test in Jira
      • Nunit3.0: "methodname" attribute
      • Nunit2.6: last substring of "name" attribute (e.g. "xxx.xxx.xxx.CanDivide")
      Summary field
      • Nunit3.0: "classname" attribute + "." + "methodname" attribute
      • Nunit2.6: "name" attribute
      Generic Test Definition custom field
      categories labels (except for the ones that match with Tests or requirements)
      "Test" property or category containing a Jira key of a Test identification of Test issue key in Jira
      "Requirement" property or category containing a Jira key of a requirement link to requirement

      The status of the Test Run will be set based on the Test case result:

      Test Cases (NUnit3.0) Test Cases (NUnit2.6) Test status
      Failed Error FAIL
      Passed Success PASS
      Other Cases Other Cases TODO

      Note: Test Cases with the status FAIL may have a failure message displayed in the Test Run screen, under the Results section.

      If the same Test Case has been executed in multiple Test Suites, then the result for each Test Suite will be shown.  A parameterized Test will also appear with its own specific context.

       REST API endpoint: /api/v1/import/execution/nunit

      PATH PARAMETERS
      parameter type description
      projectKey String key of the project where the Test Execution (if the testExecKey parameter wasn't provided) and the tests (if they aren't created yet) are going to be created.
      testExecKey String key of the Test Execution.
      testPlanKey String key of the Test Plan; if you specify the Test Plan, the Tests will be added automatically to the Test Plan if they're not part of it.
      testEnvironments String a string containing a list of test environments separated by ";"
      revision String source code and documentation version used in the test execution.
      fixVersion String the Fix Version associated with the test execution (it supports only one value).

       

      Attachments

        Issue Links

          Activity

            People

              ampr Andre Rodrigues [X] (Inactive)
              bmpc Bruno Conde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 week, 1 day
                  1w 1d
                  Remaining:
                  Remaining Estimate - 1 week, 1 day
                  1w 1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified