TestNG Testrunner properties - add documents to classpath
I was wondering if it is possible to manually add documents to the classpath that is being used by the testrunner? Someone showed me it was possible in Eclipse. The reason I am asking is, that in a project I have classes compiled into the "test-classes" classpath but some spring context and properties files reside in a separate dist directory. When the TestNG testrunner starts, these files cannot be found of course. I could write an Ant-task that copies over the files into the "test-classes" classpath and will be executed every time before a test is run, but then I would have to admit to the Eclipse guys that it was not possible another way with IDEA :)
-|
--- classes / test / *.class |
|--- dist / sar / applicationContext.xml
Please sign in to leave a comment.
Hey there,
Not from the TestNG plugin itself no, but you can do it at the project
configuration level.
Under 'Project Settings', select your module, then its dependencies tab,
and add a 'Single-Entry Module Library' for the directory containing
your additional resources.
I've used that method in the past, This has the added advantage that
those resources are now aware to IDEA as well as the TestNG plugin, so
you get some additional goodness from IDEA (code completion etc. etc.).
Mark
reikje wrote:
That worked, thanks.