TestNG for Beginners - Part 4 | TestNG Include and Exclude methods

Опубликовано: 18 Август 2026
на канале: Arun Kapoor
29
2

TestNG for Beginners - Part 4 | TestNG Include and Exclude methods | How to Include or Exclude Test Cases

--Include and Exclude TestCases in TestNG

TestNG provides the feature of enabling and disabling the test cases.
We can disable a set of test cases from getting executed. For example, consider a scenario where a serious bug occurs in a feature due to certain tests, so we need to disable the test cases from being executed.

In TestNG, test cases can be disabled in two ways:

1. You can disable the test case in a @Test annotation.
2. You can disable the test case in the XML file.

TestNG Annotations:
   • TestNG Annotations for Beginners | Automat...  

TestNG XML Files:
   • TestNG XML File Overview | TestNG - Part 2...  

TestNG Introduction for Beginners
   • TestNG Tutorial | IT Industry Tutorials | ...