Does multiple classes in a testng suite should be of same package and also i have a question on basic testng suite?

I am new to Testng and i started following your blog.When I am trying to run multiple classes in a test suite.Only one class is getting executed.Must they be in same package.
I understood the testNG suite.But what is the difference between

<suite name=“Any Name” >



<test name=“Any Name” >



<classes> <class name=“PackageName.TestCaseName” />











<suite name="Suite1" verbose="1" >



  <test name="Nopackage" >






       <class name="NoPackageTest" />







It’s not clear to me.I understood the second one ,but I did’nt understad the first one.
where should we add first one .



ajay Default Asked on January 23, 2016 in Selenium WebDriver.
Add Comment
1 Answer(s)

1. Dear.. Multiple classes can be execute with a single  suite.
inside the classes tag write the class accordingly, one-by-one[i.e. multiple class], and call them.
it will execute.

2. you can execute the classes from different package, via single suite.

kajugul Train Answered on January 27, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.