Month: July 2018

Java Programs 17: Java Program to Find Duplicate Elements in Each Row of 2D Array

Hello Programers, Problem: How to find duplicate values in each row of 2D array. For example , we have 2d array as below: Output should be : 4 , Because 4 is common in each row. Solution: This was really brainstorming as I want to avoid multiple for loops to solve this problem. My logic […]

Best Practises in Page Object Model : Naming Conventions of Web Elements & Actions on it

Hello Folks, Recently I have started learning or exploring more on best practises in Selenium Framework and same I want to share through my blogs for yours learning as well as to know your views. In this post, we will learn Naming Convention for Web Element and actions on it. Let’s consider a scenario: You […]

TestNG Tutorials 41: Skipping a Test Conditionally in TestNG

Hello Folks, In this post we will learn below topics: 1. How to skip a test conditionally? 2. How conditionally skipped test is reported in TestNG report? 3. How to report conditionally skipped test case as failed in TestNG report instead of skipped? 4. What is SkipException class? 5. What is use of isSkip() method? […]

TestNG Tutorials 40: Groups of Groups or MetaGroups in TestNG

Hello Folks, Grouping is a best feature provided by TestNG. We group test scripts based on suite name or functionality based on our requirements. We have seen grouping concepts in previous posts. In this post we will another feature of grouping in TestNG. TestNG also allows you to create group of groups i.e. meta data. […]

TestNG Tutorials 39: Run Only Test From a TestNG Class Without Using TestNG XML?

Hello Folks, Suppose you have created a testng class which has many @Test annotated methods say 10 test methods. You may need to run only one test out of 10 for debug/verify etc. Generally I see people will comment “@Test” annotations or use testng.xml to include required test method using include or exclude tags. There […]

TestNG Tutorials 38: How to Execute Groups in TestNG without Using TestNG XML

Hello folks, In this post, we will see something new related to grouping in TestNG. When we assign group or groups to test methods in TestNG, to include or exclude groups to run we use TestNG xml. Do you know that we can run groups without TestNG xml and can include, exclude groups easily compare […]

TestNG Tutorials 37: Usage of Regular Expression With Group Names in TestNG

Hello Folks, Proper categorisation/grouping of test scripts is very important as it gives us flexibility in running specific or group of tests. Group names followed by meaningful prefix or suffix help us in reducing number of lines of codes to execute desired groups. We will see an example below: You have multiple groups of tests […]

Understand Verification & Validation In Software Testing

Hello Folks, We testers are always confused with these two terms : Verification & Validation. I will try my best to explain these terms in simple words in this post. Verification and Validation are different testing activities which are performed during SDLC. We use both words interchangeably and think our all testing activities fall either […]

Java Programs 16: Java Program to Find Length of String Without Using Length Method

Hello Programmers, An interview candidate was asked to write java code to find the length of given string WITHOUT USING LENGTH METHOD in Capgemini. In this post, I will find length of string without using Length method but using some other method. :-p There is another method in String class called lastIndexOf(). LastIndexOf() method: As […]

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.