Using TestNG asserts in a non-TestNG test

Alex Schenkman alex.schenkman at
Mon May 6 04:05:01 PDT 2013

Hi list,

I have a test that should run with a few VM options and thus I've been 
running it as:
@ run main/othervm -DmyOptions MyTest

I'd like to use the asserts found in TestNG, so I add the import:
import static org.testng.Assert.*;

The compile phase complains about not finding org.testng.
If I run it like this, the import is found:
@ run testng MyTest

But this is not really what I want, as it adds another complexity layer 
to the test, namely the TestNG framework.
So the question is:
How can I reference the (bundled) jtreg/lib/testng.jar?

Thanks in advance!

Alex Schenkman
Java VM SQE Stockholm

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the jtreg-use mailing list