Make Selenium Easy – Page 22

This program was asked in Siemens. Problem Statement: You need to find missing alphabets from a given string. E.g. User input: “Amod Mahajan” Output: [B, C, D, E, F, G, H, I, J, K, L, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, b, c, e, f, g, i, k, l, … Continue reading Frequently Asked Java Program 20: Java Program to Find Missing Alphabets in Given String

Hello guys,  In previous post, we have seen Introduction of HTTP methods.  In this post, we will see what is called safe methods in HTTP methods. This is an important interview question also.  All HTTP methods can be categorised in two categories: Safe methods & Unsafe methods.  We know that all HTTP methods deal with … Continue reading API Testing Tutorial Part 5 – Safe Methods in HTTP Methods

Let’s start with a real time example. You must have heard about Facebook. To create an account of Facebook, you need to provide some personal details and hit enter. Now you have your own Facebook account. Your data is created in Facebook database. Who did this for you? A Facebook API. An API who is responsible … Continue reading API Testing Tutorial Part 4 – Understand Basics Of Http Methods – CRUD Operations

This is a frequently asked interview question for API testing. All these terms are confusing to beginners as well as experienced.  I will try to explain it well in this post.  I will start with the line – ” All above terms are same at a final point. These words are the stages representing evolution … Continue reading API Testing Tutorial Part 3 – Understand Terms URN , URL ,URI & API

Hello folks, When we parametrize methods in a TestNG class, we must need to pass parameter values from testng xml. If we do not pass we get an exception. We will see an example below: TestNG class: Testng xml without parameters: Output: When we define a parameter in a method of a testng class, TestNG … Continue reading TestNG Tutorials 47: Marking a Parameter as Optional in TestNG

Hello Folks, In this post we will learn an important concept of parameters in TestNG. We know that we can create parameterised methods in a TestNG class and pass parameters to these methods through testng xml. We can pass parameters at four levels: At suite level At test level At class level At method level … Continue reading TestNG Tutorials 46: Overriding Parameters in TestNG

Problem statement: Write a Java program to reverse position of words in given string i.e. word at first position in string should be at last position in string. Input String: You are awesome Output String: awesome are You Solution: It is a very easy program. You just need understanding of splitting a string, array and … Continue reading Frequently Asked Java Program 19: Java Program to Reverse Position of Words in a String

Hello Programmers, “Java Program to Reverse Every Word of a String” is frequently asked programming interview questions to freshers and experienced. I will try here to explain logic in simple steps so that you do not need to remember lines of code. Just implement the logic and you can code it.  Problem statement: Original string      … Continue reading Frequently Asked Java Program 18: Java Program to Reverse Every Word of a String

Hello folks, TestNG allows us to create parameterized methods in a TestNG class. A TestNG class may contain more than one @Test annotated methods and every test method may accept zero or more parameters. We can pass those parameters as a whole at “suite” level or “test” level. Sometimes, it becomes confusing when there are … Continue reading TestNG Tutorials 45: Passing Parameters at Test Method Level in TestNG

Hello Folks, We have seen previously that how can we parameterize methods in a TestNG class. The approach of using @Parameters annotations with each methods is not so good. Some demerits of this approach are as below: You need to include @Parameters annotation with each parameterized method. You need to accept as many as attributes … Continue reading TestNG Tutorials 44: Constructor with @Parameter Annotation