TestNG Tutorials 62: Dependency in TestNG – Types of Dependencies in TestNG

We have learnt in previous posts regarding establishing relationship between test methods. You can go through them below: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnMethod Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnGroup Before we learn about types of dependencies in TestNG, lets see one scenario first: If

Read More

TestNG Tutorials 61: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnGroup

In previous post, We have learnt to Establish dependency among test methods. In this post, we will see another concept in Dependency called DependsOnGroup. Consider a scenario: You have created automation scripts for Integration testing. We know that in integration testing, data flows from one module to another. You divide your test methods as per group.

Read More

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

Frequently Asked Java Program 23: Java Program to Remove Extra WhiteSpace Between Words In Given String

Problem Statement: Remove extra white spaces between words. Only one white space is allowed between words. If more than one, remove it. If given string has leading or trailing white spaces, remove them as well. Do not use trim method. Write your own logic. Example: You entered with spaces: ”       Make     

Read More

Frequently Asked Java Program 22: Java Program to Trim Whitespace From String Without Using Trim Method

Hello Folks, This interview question was asked in Deloitte.  Write a java program to Trim a given string without using inbuilt trim() method of String Class in Java. “trim()” method of String class trims leading and trailing whitespace/s of given string. It does not remove whitespace between words. We need to write logic to do so.

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.