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

ability to customize Summary and Description fields on individidual Test issues using TestNG reports

    XporterXMLWordPrintable

Details

    • Suggestion
    • Status: New
    • Resolution: Unresolved
    • None
    • None
    • REST API
    • None
    • UNCOVERED

    Description

      Similar to what is available for Xray server/DC, whenever uploading test results using the TestNG XML format, Xray should process custom test case' attributes, in  case these are provided (thus, they're optional) to set/overwrite the summary and description fields, if any of these are provided.

       

       

      TestNG XML report Test in Jira
      "summary" attribute under the <attributes> tag, within some <test-method>
      This overrides the "name" attribute of <test-method> element as the summary.
      Summary field
      "description" attribute under the <attributes> tag Description field

       

       

      This will enable users to specify them directly from the test automation code, using this helper package for example, or even if they set the attributes directly "by hand" as shown ahead.

       

       

       

      import org.testng.Assert;
      
      import org.testng.annotations.Test;
      
      import org.testng.Reporter;
      
      import org.testng.ITestResult;
      
      
       
      
      public class CalcTest {
      
      
      
          @Test
          public void CanAddNumbers()
      
          {
              Assert.assertEquals(Calculator.Add(1, 1),2);
      
              ITestResult result = Reporter.getCurrentTestResult();
              result.setAttribute("summary""custom Test issue summary");  // Xray will use this for the Test issue' summary, instead of using the method name
      
              result.setAttribute("description""a basic test for integer addition, ....");    // Xray will set the Test issue's description  with this content
      
          }
      
      
      ...
      }

       

       

       

      Attachments

        Issue Links

          Activity

            People

              helder.ferreira Helder Ferreira
              smsf Sergio Freire
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: