TestNG Tutorials 69 : Rerun Failed Test Method Using IRetryAnalyzer Interface – Implementing With Listener – IAnnotationTransformer

Hello Folks, We have already learnt about IRetryAnalyzer interface in previous post. We know why we use it and how can we use it. From previous post, you know that we can pass implemented class of IRetryAnalyzer as an value to attribute named "retryAnalyzer" at @Test annotation. You need to add it each and every @Test annotation … Continue reading TestNG Tutorials 69 : Rerun Failed Test Method Using IRetryAnalyzer Interface – Implementing With Listener – IAnnotationTransformer

TestNG Tutorials 68 : Rerun Failed Test Method Using IRetryAnalyzer Interface – Implement Using retryAnalyzer attribute in the @Test annotation

Hello Folks, TestNG provides a built in mechanism to re-run failed test case for N times (Ideally) instantly using IRetryAnalyzer interface. It means that if a test method fails, we can rerun it for N times or until it is passed during run. Let's see this concept in more details: IRetryAnalyzer Interface: IRetryAnalyzer is an interface … Continue reading TestNG Tutorials 68 : Rerun Failed Test Method Using IRetryAnalyzer Interface – Implement Using retryAnalyzer attribute in the @Test annotation

TestNG Tutorials 67 : Difference Between @Ignore & enabled Attribute of @Test Method in TestNG

Hello Folks, In last post, we have learnt about new annotation of TestNG , named @Ignore which is used to ignore @Test annotated methods at different levels i.e. Method, Class and Package. We have another attribute of Test annotation named "enabled" which is also used to serve the same purpose. So what are the differences … Continue reading TestNG Tutorials 67 : Difference Between @Ignore & enabled Attribute of @Test Method in TestNG

TestNG Tutorials 66 : Ignoring Tests in TestNG Using New Annotation @Ignore

Hello Folks, TestNG provides an attribute called "enabled" which can be used to ignore a test in a running suite. If we use this attribute at class level with @Test annotation, it will ignore all tests of that class. Now TestNG is providing a new annotation called "@Ignore", which can be used to ignore : … Continue reading TestNG Tutorials 66 : Ignoring Tests in TestNG Using New Annotation @Ignore

TestNG Tutorials 64: Dependency in TestNG – ignoreMissingDependencies – Another Way of Achieving Soft Dependencies

Hello Folks, There are two types of dependencies in TestNG: 1. Hard Dependency : All the methods you depend on must have run and succeeded for you to run. If at least one failure occurred in your dependencies, you will not be invoked and marked as a SKIP in the report. 2. Soft Dependency : You will always be … Continue reading TestNG Tutorials 64: Dependency in TestNG – ignoreMissingDependencies – Another Way of Achieving Soft Dependencies

TestNG Tutorials 63: Dependency in TestNG – Usage of Regular Expressions with DependsOnGroup

Hello Folks, 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 In this post, we will learn how can we use regular expressions with … Continue reading TestNG Tutorials 63: Dependency in TestNG – Usage of Regular Expressions with DependsOnGroup

TestNG Tutorials 62: Dependency in TestNG – Types of Dependencies in TestNG – Hard Dependency & Soft Dependency

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 … Continue reading TestNG Tutorials 62: Dependency in TestNG – Types of Dependencies in TestNG – Hard Dependency & Soft Dependency

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. … Continue reading TestNG Tutorials 61: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnGroup

TestNG Tutorials 60: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnMethod

We are going to see another important concept or feature provided by TestNG. This feature is called as Dependency. Suppose, we need to post a status on Facebook. Let's write a Test Case for it: Step 1: Launch browser. Step 2: Launch Facebook url. Step 3: Create an account on Facebook. Step 4: Post a … Continue reading TestNG Tutorials 60: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnMethod

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 … Continue reading TestNG Tutorials 59: DataProvider in TestNG – Running DataProvider Method in Parallel – Parallel DataProvider Method