October 2018 – Make Selenium Easy

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      […]

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. […]

Hello, DataProvider is an important functionality provided by TestNG to achieve Data driven testing or providing a set of different dataset to a method to execute on. We have seen DataProvider concept in details in previous posts. DataProvider may become nightmare if number of data (arguments) is more or it keeps changing or you do not […]

Hello Folks, As part of ongoing series on DataProvider, we will learn “How does Encapsulation ( in OOPS concept) help in a DataProvider method? ” in this post. Encapsulation is an Object Oriented Programming concept which describes binding of related stuffs together under one roof. It makes easier to add , remove and modify members. For […]

Hello Folks, As part of our API Testing series, we will see “Sending first GET 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 […]

Hello Guys, DataProvider method in TestNG is a way to provide test data to Test annotated methods in a TestNG class. A typical DataProvider method looks like as below:

// A data provider method with return type as 2D array @DataProvider(name = “DataContainer”) public Object[] myDataProvider() { return new Object[][] { { “Mukesh”, “Otwani”, “Motwani@gmail.com” }, { “Amod”, “Mahajan”, “Amahajan@hotmail.com” }, { “Animesh”, “Prashant”, “aprashant@gmail.com” }, { “Ankur”, “Singh”, “asingh@gmail.com” }, { “Amritansh”, “Kumar”, “akumar@gmail.com” } }; }

// A data provider method with return type as 2D array @DataProvider(name = “DataContainer”) public Object[] myDataProvider() { { “Mukesh”, “Otwani”, “Motwani@gmail.com” }, { “Amod”, “Mahajan”, “Amahajan@hotmail.com” }, { “Animesh”, “Prashant”, “aprashant@gmail.com” }, { “Ankur”, “Singh”, “asingh@gmail.com” }, { “Amritansh”, “Kumar”, “akumar@gmail.com” }

You can see that return type of above DataProvider method is an Object array. Is it mandatory to have return type as Object only? Answer […]

Hello Folks, As part of our API Testing series, we will see “Introduction of Postman Tool” in this post. Postman is a complete API development environment/suite which supports every stage of the API lifecycle. Through design, testing and full production, Postman is there for faster, easier API development—without the chaos. Postman’s API Development Environment (ADE) consists of […]

Hello Folks, As part of our API Testing series, we will see “Tools to test SOAP and REST APIs manually and automation”  in this post. There are many tools available for API testing in market with many advanced features. Some tools are free and some are paid. You get basic features when you use a free […]

Hello Folks, As part of our API Testing series, we will see “Difference between SOAP and REST web services” in this post. Note: It is a frequently asked interview question in interviews. Designing a web services or API depends on two common implementation: SOAP – Simple Object Access Protocol REST – Representational State Transfer Protocol   […]

Hello Folks, As part of our API Testing series, we will see “Introduction of SOAP” in this post. SOAP stands for “Simple Object Access Protocol“. Protocol is a set of rules which are followed to achieve something or need to follow if performing specific things. For example: There are a set of rules defined for […]