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

Frequently Asked Java Program 28: Java Program to Find if Given Number Is a Perfect Number

Perfect Number: A Perfect number is a positive integer that is equal to the sum of its proper divisors excluding the number itself. For Example: Take Number 6. Its divisors are 1, 2 , 3 and 6. When we add all divisors except 6 ( as it is number itself) (i.e. 1+2+3= 6), it is equal to actual … Continue reading Frequently Asked Java Program 28: Java Program to Find if Given Number Is a Perfect Number

Frequently Asked Java Program 27: Java Program to Find Occurrence of Any Char in a Given String Without Iterating

Problem Statement: Find occurrence of given char  (Ignore case)  in given string without iterating through string. Input - Make Selenium Easy Char - 'M' Output- Occurrence of M is 2. Problem Solution: We need to solve this problem without iterating through string in search of character. Its simple. Logic step by step: FInd the initial length … Continue reading Frequently Asked Java Program 27: Java Program to Find Occurrence of Any Char in a Given String Without Iterating

Frequently Asked Java Program 26: Java Program to Find Occurrence of Each Char in a Given String Without Using Collection

Problem Statement: Write a program to print occurrence of each character in given string without using Collection. Example:- Please enter the string to find occurrence of each char: Make Selenium Easy You entered: Make Selenium Easy Occurrence of M : 2 Occurrence of A : 2 Occurrence of K : 1 Occurrence of E : … Continue reading Frequently Asked Java Program 26: Java Program to Find Occurrence of Each Char in a Given String Without Using Collection

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

Postman Tutorial Part 5 – Sending POST Request in Postman

Hello Folks, As part of our API Testing series, we will see “Sending first POST request in Postman”. First of all we need some APIs to test. There are many public APIs available which you can use for testing purpose. I will suggest you to register at below site to use free APIs for testing: GoRest … Continue reading Postman Tutorial Part 5 – Sending POST Request in Postman

TestNG Tutorials 65 – DataProvider in TestNG – All Possible Causes of Occurring Data Provider Mismatch Exception

Hello Folks, DataProvider is an awesome functionality provided by TestNG to achieve Data Driven Testing. You must have already seen many posts on DataProvider on my blog. If not, I will advise you to go through them. If you have used DataProvider in your tests, you must have encounter "Data provider mismatch" exception. I see … Continue reading TestNG Tutorials 65 – DataProvider in TestNG – All Possible Causes of Occurring Data Provider Mismatch Exception

How to Validate Field Color in Selenium WebDriver – Validation for Mandatory FIeld or Valid values

Hello Folks, Color code may represents an information about field. Consider below scenarios: All mandatory field of a web form will have a yellow bottom color.      2. If User does not enter proper value in a text box, color of text box will be converted in to red. You can verify these functionalities … Continue reading How to Validate Field Color in Selenium WebDriver – Validation for Mandatory FIeld or Valid values