some questions for TestNG support in Jtreg
jonathan.gibbons at oracle.com
Fri Oct 18 16:46:15 PDT 2013
Sorry, you can't do what you want. You'll have to move your tests
around a bit.
If you nominate the directory containing a1 and a2 to be a TestNG
directory, then *all* the Java files under that directory will be
treated as TestNG tests within the same package hierarchy. You can't
mix and match having some files (like those in a1 and a2) exsiting
within a package name space and other files (like those in a3/b3) in the
unnamed package yet existing within an enclosing package name space.
This is no different from having any files existing in a package
hierachy -- generally, no other tools would encourage this sort of
organization, and jtreg is no exception.
I suggest you either move a1, a2 down a level, as in
or somewhat equivalently, move a3 up a directory level.
On 08/21/2013 03:47 AM, patrick zhang wrote:
> Hi List,
> I have some functional tests based on TestNG, the dir structure looks
> For Test1.java and Test2.java, they are located in "a1.b1" or "a2.b2"
> package really.
> But for Test3.java, it is in default package. Here a3/b3 is only
> simple source directory.
> As you know, we can use TEST.properties to declare source root like below:
> //it can be referenced to Test1 and Test2. Fail to get Test3.
> TestNG.dirs = .
> //it can be referenced to Test3. Fail to get Test1 and Test2.
> TestNG.dirs = a3/b3
> My question is how I can reference to Test1, Test2 and Test3 at same
> time? It looks "TestNG.dirs = .;a3/b3" or "TestNG.dirs = . a3/b3" does
> not work.
> For some reason I want to keep all structure hierarchy. And I do not
> want to move Test.java into a3.b3 package. Could it be resolved
> through TEST.properties directly?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jtreg-use