Month: May 2018

TestNG Tutorials 18: Default Priority Of @Test Methods In TestNG

Hello Folks, Let’s run below TestNG class and observe output: Output: Can you see different order of execution of test methods than it has appeared in class? “Amrrod” method is last but got executed first. “Print” method is first but executed in second position. Actually, TestNG does not run Test methods as it appears in […]

TestNG Tutorials 17: Can @Test Annotation Be Used For A Class In TestNG?

Hello Folks, Let’s learn something new today. We have used @Test annotation on methods. Can we use @Test annotation on a class? Yes, We can use @Test annotation on class. Suppose, you need to write 10 @Test annotated method in a class.  Either you mark all methods as @Test annotated or directly annotate class itself as […]

Understand Severity And Priority Of A Defect In Software Testing

Hello Folks, In this post, we will see an important concept of manual testing which is also a frequently asked interview question for both freshers and experienced. We will understand below points: What do you understand by severity and priority of a defect? Differentiate between severity and priority. Types of severity and priority. Who decides […]

TestNG Tutorials 14: Can We Overload Methods In TestNG Class?

Hello Folks, Method overloading is an important concept in Java. Can we create overloaded method in TestNG class. Let’s give it a try. Overloaded TestNG class: Create a testng.xml and run it: Output: You will get above exception in console because TestNG does not allow you to put any type of parameters to a TestNG […]

TestNG Tutorials 13: Can An Interface have TestNG Methods? If Yes, How To Execute Them?

Hello Folks, We talked about TestNG class in previous post. Can we declare and define TestNG annotated methods in an Interface? We will learn now. As per Java 8, An interface can have abstract methods, default methods and static methods. Let’s create an Interface with TestNG annotated abstract methods and observe what happens: An interface […]

TestNG Tutorials 12: How To Run Inner TestNG Class From TestNG.xml ?

Hello Folks, We will see an interesting topic in this post. We can create an inner TestNG class as well like any normal inner class in Java. An example is as below: Let’s try to generate a testng.xml for this: TestNG includes outer and inner class names default. That’s good. Happy. Now run above testng.xml: […]

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.