Olaganathan.S
Olaganathan.S

Reputation: 351

Working With TestNG

I am working as a trainee in Automated Testing Environment. I have to know about TestNG and some examples of TestNG. What is meant by Test Suite? Can anybody please provide me some example coding?

Upvotes: 0

Views: 648

Answers (3)

ChamaraS
ChamaraS

Reputation: 389

Test suite is the driving class of test cases. if you have many testcase classes with the multiple test methods, test suite class or suite.xml can call each of the test class one by one.

Upvotes: 0

artdanil
artdanil

Reputation: 5082

In TestNG suite is the highest level of grouping tests. It is defined by the single XML file. It can include test constructs (which are different from specific tests you will implement), groups, classes, and methods. To understand better how all these elements are related look into 5 - Test methods, Test classes and Test groups section of documentation. To understand how <suite> is defined in testng.xml, check out DTD for this file.

Below please find some recommendations that can help you better understand TestNG and unit testing in general:

  1. Definitely, start at the documentation section of TestNG website. They provide some code samples in Java.
  2. If you can get hold of the book Next Generation Java Testing, this would be a good resource to continue. Also have illustrations of discussed functionality in Java.
  3. You need to understand testing fundamentals, to see how TestNG uses them:
  4. Look at some other unit tests frameworks and tutorials. The simplest would be JUnit, which is where most of TestNG came from (at least according to the book).

Upvotes: 3

Mikezx6r
Mikezx6r

Reputation: 16905

Why not start at the source? The TestNG documentation on their site

http://testng.org/doc/documentation-main.html

Upvotes: 5

Related Questions