Day: May 13, 2018

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

TestNG Tutorials 11: How To Run TestNG class From Sub-package Using TestNG.xml?

Hello Folks, Java allows you to group similar types of classes, interfaces and sub packages. You can create nested packages means package inside package which is termed as sub-packages. Let’s create a below hierarchy of package: Create a Package “MainPackage”. Create a class “MainPackageClass”  in “MainPackage” Create a sub package “SubPackage” inside “MainPackage”. Create a class […]

TestNG Tutorials 10: What Is Package Tag And How To Use In TestNG.XML?

Hello Folks, When we generate a testng.xml for TestNG classes of a package, we see all class names (with at least one @Test annotated method) of that package under “class” tag wrapped by <classes> tag. We can see an example below: When we have multiple packages in a project , testng.xml includes all TestNG classes from […]

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.