What is a Test Suite?

A test suite is a collection of test cases. There are various ways to create test these. You could either choose to group these tests by functionality or you could simply club your test classes together to form a test suite. In TestNG, the test suite is written in the form of a xml document. This allows you as a tester to have a fine grained control over what tests you want to run and create groups or suites according to the very specific requirements of your project.

How to Create Test Suite in TestNG?

In this article we will learn about test suites and how can we build them using Java and TestNG. TestNG is a modern testing framework that is used very widely used today. It has a broad base of features that allow us to write unit tests and club them together in groups.

Table of Content

  • What is a Test Suite?
  • Steps to Create Test Suite in TestNG
  • Understanding TestNG XML Configuration
  • Creating Test Suites Using TestNG XML
  • Running Test Suites
  • Conclusion
  • FAQ’s on How to Create Test Suite in TestNG

TestNG is used in combination with Selenium to implement browser automation and therefore used for regression testing. By the end of this article, you will be successfully creating and running your own test suites.

Similar Reads

What is a Test Suite?

A test suite is a collection of test cases. There are various ways to create test these. You could either choose to group these tests by functionality or you could simply club your test classes together to form a test suite. In TestNG, the test suite is written in the form of a xml document. This allows you as a tester to have a fine grained control over what tests you want to run and create groups or suites according to the very specific requirements of your project....

Steps to Create Test Suite in TestNG

Step 1. Setting Up TestNG Environment...

Understanding TestNG XML Configuration

Introduction to TestNG XML configuration file...

Creating Test Suites Using TestNG XML

Guide to creating a basic test suite in TestNG XML...

Running Test Suites

Running Test Suites From IDE...

Conclusion

In this article we looked at what test suites are and how we can create them using TestNG in java. We looked at two approaches to clubbing tests, through groups and through classes. Hope you learnt something useful. If you want to discuss something, please feel free to leave comments below....

FAQ’s on How to Create Test Suite in TestNG

Where can I use the tag inside testng.xml?...