Posts tagged "TestNG "

Tag Archives: TestNG

Data Provider in TestNG

Test case parameterization is the technique to execute the same Test Case with different input values. Parameterized tests allow developers to run the same tests over and over again using different values.   We will see how to parameterize the Test case in TestNG. There are two ways in TestNG to make the test case parameterized … Continue reading Data Provider in TestNG

Test Groups in TestNG

Let’s see the concept of Test Groups in TestNG. Grouping Test Methods in TestNG is one of the most important features of TestNG. We can group the Test Methods or Test Classes in TestNG. This feature allows the test methods to be segregated into different sections or modules.   With the help of Grouping, you can make … Continue reading Test Groups in TestNG

Assertion in TestNG

The assertion in TestNG means “Trust but Verify” Assertion is performed to compare the Actual result with expected result. In TestNG assertion is performed with the help of Assert Class.   Assert helps us to verify the conditions of the test and decide whether the test has failed or passed.  It is most popular and frequently used … Continue reading Assertion in TestNG

TestNG Annotations

TestNG comes with a series of Annotations. TestNG is very rich in annotations. We will see the TestNG annotations with Example. You don’t need to main() method to execute your Test Class. TestNG annotation will create the object of the class and start execution.   Let’s see important annotations of TestNG. 1. @BeforeSuite – Methods … Continue reading TestNG Annotations

Skip Test in TestNG

Skip test means, we don’t want to execute some particular test when Test Class will execute. In TestNG, we have various way to do this. We can skip the test completely or skip when some particular condition occurs.   There are many ways to skip the Test in TestNG, We will discuss all in detail … Continue reading Skip Test in TestNG

Execution order of TestNG Annotations

Let’s discuss the execution order of TestNG Annotations. TestNG annotations execute in a predefined order. It’s very easy to find out the execution sequence of TestNG annotations. We will create  Test class in TestNG and include important annotations in that test class and execute the test class. Now we will note the Execution order of … Continue reading Execution order of TestNG Annotations

Set Test Dependencies in TestNG

We can set Test dependencies in TestNG. Dependency is a feature in TestNG that allows a test method to depend on a single or a group of test methods. TestNG allows you to specify dependencies either with: Using attribute dependsOnMethods in @Testannotations. Using attribute dependsOnGroups in @Testannotations.   Facts about dependencies – The dependency on multiple test methods are configured … Continue reading Set Test Dependencies in TestNG

Test Suite in TestNG

Let’s see, What is Test Suite in TestNG. As we know Test Suite is something which is used to execute the test cases in a batch. We include many test cases in a single suite and run these test cases as the batch. So running a set of test cases together is call executing a Test Suite. … Continue reading Test Suite in TestNG