TestNG Tutorials 59: DataProvider in TestNG – Running DataProvider Method in Parallel – Parallel DataProvider Method

A Test method is run for all data set provided by a DataProvider method which is by default one after another. Note here that test method is run on data in same sequence in which DataProvider pass it. The reason behind this is that a DataProvider annotated method has an attribute named “parallel” whose default

Read More

TestNG Tutorials 58: DataProvider in TestNG – Running Test for Specific Set of Data Provided by DataProvider Method – Dataprovider With Indices

By default a Test method is executed for all data set returned by DataProvider. The reason behind this is that a DataProvider annotated method has an attribute called “indices” whose default value is set to “all”. You may need to run only specific set of data. Like if DataProvider providing you five set of data

Read More

TestNG Tutorials 57: DataProvider in TestNG – Passing External Data File Name to DataProvider Method Using TestNG xml

In last post, we have learnt how can we make parameterized DataProvider method in TestNG to provide test data to multiple Test methods from single DataProvider method. Let’s make it more customised. Suppose you need to read data from external file like Excel, properties file etc in a DataProvider method. The name of external file

Read More

TestNG Tutorials 56: DataProvider in TestNG – Parameterizing DataProvider Method to Provide Data to Multiple Test Methods

“DataProvider” is an important feature provided by TestNG to provide required test data to test methods to run on. We have learnt different approaches which we can utilize to get best of DataProvider in previous posts. Let’s learn another way to make more use of DataProvider in TestNG. Suppose we have three Test methods and

Read More

TestNG Tutorials 55: DataProvider in TestNG – Lazy Initialisation of DataProvider Method – Use of Iterator Return Type

Hello, DataProvider is an important functionality provided by TestNG to achieve Data driven testing or providing a set of different dataset to a method to execute on. We have seen DataProvider concept in details in previous posts. DataProvider may become nightmare if number of data (arguments) is more or it keeps changing or you do not

Read More

TestNG Tutorials 54: DataProvider in TestNG – Implementing Object Oriented Concept “Encapsulation” with DataProvider Method

Hello Folks, As part of ongoing series on DataProvider, we will learn “How does Encapsulation ( in OOPS concept) help in a DataProvider method? ” in this post. Encapsulation is an Object Oriented Programming concept which describes binding of related stuffs together under one roof. It makes easier to add , remove and modify members. For

Read More

TestNG Tutorials 53: DataProvider in TestNG – Is It Mandatory To Have Return Type as Object in DataProvider Method

Hello Guys, DataProvider method in TestNG is a way to provide test data to Test annotated methods in a TestNG class. A typical DataProvider method looks like as below:

You can see that return type of above DataProvider method is an Object array. Is it mandatory to have return type as Object only? Answer

Read More

Advanced Selenium Concepts – Custom Select Class – Select Value Containing Specific Text in Drop down

Hello Folks, Most of us we know that to handle a dropdown developed using Select tag, we can use inbuilt class of Selenium named “Select” class. This class provides you three methods to select options in dropdown which are below: selectByValue – You need to provide exact value to get it selected. selectByVisibleText – You

Read More

Advanced Xpath Concept – Method normalize-space & Its Usage

Hello Folks, In this post we will going to learn an advanced concept of xpath: – normalize-space method.  Before we discuss about method normalize-space, we will see why do we require that. Consider below html codes: <anyTag>   Make       Selenium      Easy </anyTag> (Inner text has more white spaces among words than normal.)  It

Read More

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.