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

As system, TestNG tests and results can be imported by REST API and from Test Execution issue screen

    XporterXMLWordPrintable

Details

    • Story
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • R3.1.0
    • None
    • R3.1.0 S2, R3.1.0
    • OK

    Description

      The system should be able to import TestNG tests and results by using either the REST API or the "Import Execution Results" action within a Test Execution's issue screen.
      TestNG is a testing framework for Java.

       

      It should provide support:

      • test methods
      • test groups
      • parameterized tests

       

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

      TestNG's groups are not mapped to any special entity. However, the execution details screen will show the Test group related to a specific test result (e.g. "parent group.subgroup1 - TestMethodBla(1,2,3)" ).

      Mapping of fields from the report to the Test issue

      TestNG XML report Test in Jira
      "methodname" attribute Summary field
      "classname" attribute + "." + "methodname" attribute Generic Test Definition custom field
      groups labels

       

      Similar to what is available for other formats (e.g. JUnit, NUnit), two endpoints shall be provided: a standard one and a multipart variant.

       

      POST /rest/raven/1.0/import/execution/testng

       

       

      parameter type description
      fixVersion String - the Fix Version associated with the test execution (it supports only one value).
      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.
      revision String
      • the system revision (e.g. code revision, build number) used in the test execution.
      testEnvironments String - a string containing a list of test environments separated by ";"
      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.

       

       

      POST /rest/raven/1.0/import/execution/testng/multipart
      

       Ex: curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@report.xml" -F "info=@testExec.json" http://yourserver/rest/raven/1.0/import/execution/testng/multipart 

       

      References:

      Attachments

        Issue Links

          Activity

            People

              pmmr Pedro Rodrigues
              smsf Sergio Freire
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 week, 1 day Original Estimate - 1 week, 1 day
                  1w 1d
                  Remaining:
                  Time Spent - 1 week, 1 hour, 10 minutes Remaining Estimate - 1 day, 6 hours, 10 minutes
                  1d 6h 10m
                  Logged:
                  Time Spent - 1 week, 1 hour, 10 minutes Remaining Estimate - 1 day, 6 hours, 10 minutes
                  1w 1h 10m