Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleSupported versions

Xray supports TestNG 6.14 XML reports.

TestNG Basic Concepts

In NUnitTestNG, you have TestsTest methods, Parameterized TestsTest methods, Test classes, ( Test ) Suites and TestFixtures, among other thingsgroups, suites.

  • A Test method 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.
  • . Parameters may come from the XML configuration file used by TestNG or from a data provider (i.e. a method that generates a set of values);
  • Tests code is implemented within Test classes;
  • Test groups are somehow similar to using Jira labels in Jira issues, in the way that they're used to mark the Test methods as belonging to some "category"; these groups can be used afterwards to more easily select the Test to be run;  
  • A suite is a configuration file (i.e. a XML file) that is used to enumerate all the Tests to be run, based on the Test classes, Test groups, packages, Test methods.

TestNG NUnit uses "attributes" in order to ascribe behavior/characteristics to certain parts of your automated test code; these attributes can be set in the Test method's code.


Info
titleLearn in practice

Please look at the basic Java example: Testing using TesNG TestNG in Java.

Importing

...

TestNG XML reports

Below is a simplified example of an NUnit 3.0 a TestNG XML report containing a Test Suite with some Test Cases.

...

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.


<REPLACE>


Whenever a Test Case is executed in multiple Test Suitescontexts, the overall status of the Test Run will be calculated as a joint value.

...