Make Selenium Easy – Page 24
Hello Folks, This is also an interview question. These questions are asked to know how much you can think on a scenario. Question was, “Can a test method return a value? If yes, how can you use it?”. Yes, a @Test annotated method can return a value but that method will not be considered as … Continue reading TestNG Tutorials 36: Can a Test Method Return a Value in TestNG?
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 … Continue reading Java Programs 16: Java Program to Find Length of String Without Using Length Method
Hello Folks, It is frequently asked interview question to write a java program to print fibonacci number at any given position. I have already explained about program logics to print fibonacci series using both recursive and iterative model. Java program to print fibonacci series using iteration logic java program to print fibonacci series using recursion … Continue reading Java Programs 15: Java Program to Print Fibonacci Series at Given Position Using Recursion
Hello Folks, Before continuing this post, you must go through below posts: Integration of TestNG and Beanshell How To Pass a Group Name to be Run at Runtime in TestNG XML Using Beanshell Problem statement: You have created so many test methods with different groups. You do not need to run all group every time. … Continue reading Advanced TestNG Tutorials 35: How To Pass Multiple Group Names to be Run at Runtime in TestNG XML Using Beanshell
Hello Folks, In last post, we have seen how integration of beanshell and TestNg can help us to achieve “AND” and “OR” conditions with group names to be executed. Problem statement: You have created so many test methods with different groups. You do not need to run all group every time. You need to include … Continue reading Advanced TestNG Tutorials 34: How To Pass a Group Name to be Run at Runtime in TestNG XML Using Beanshell
Hello Folks, This is a frequently asked programming interview question to print a fibonacci series of given length. In previous post, we have seen printing fibonacci series using iterative logic with collection concept. This will be acceptable for freshers but not for experienced, interviewer expects recursion logic. This post explains in details how recursion takes … Continue reading Java Programs 14: Java Program to Print Fibonacci Series of Given Length Using Recursion
Hello Folks, This is a frequently asked programming interview question to print a fibonacci series of given length. Fibonacci series: Wikipedia defines it very well. The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding … Continue reading Java Programs 13: Java Program to Print Fibonacci Series of Given Length Using Collection
Hello Folks, We have learnt how can we customise testng xml to run test methods belonging to multiple groups. Let’s consider a new scenario: Suppose There are three methods M1 ( belongs to group WIndows), M2(belongs to group Windows and Linux) and M3(belongs to group Windows ,Linux and Mac). You want to run methods which … Continue reading Advanced TestNG Tutorials 33: Integration and Usage of BeanShell In TestNG XML
Hello Folks, In last post, we learnt about Multiple groups names foe test and configuration methods. When we assign a method to multiple groups, you find difficulties when you want to run methods belong to only particular groups or to only some groups. For example: Suppose There are three methods M1 ( belongs to G1), … Continue reading TestNG Tutorials 32: Customizing TestNG xml For Methods Belong to Multiple Group Names
Hello Folks, In previous posts, we have learnt about: Grouping test methods in TestNG Grouping configuration methods in TestNG We know grouping is categorization of test scripts. Let’s ask a question to yourself: Is it possible that a test script may fall in more than one categories? Obviously Yes. So how can we achieve same … Continue reading TestNG Tutorials 31: Multiple Groups Name For Test And Configuration Methods in TestNG