TestNG

sorry for posting this here - maybe this belongs to some testng forum, but anyway, for my convenience I post it here:

I really like to switch to testng, because the strange thing JUnit does between each test method is causing me trouble.

ok, but one thing of the supercool TestNG really seems unconvenient to me: why should I list each single test in an XML file? i really prefer the
]]>
<include name="*/Test.java"></include>
</fileset>

as all my tests are in there own directory anyway.

Is it not a bit of a maintenance nightmare to be forced to modify an XML file each and every time you add a test class?

Please enlighten me ;)


M.

2 comments
Comment actions Permalink

You can specify package names. It's not exactly the same as what you're asking for but it should save you from having to type in every class. Here's a sample from the TestNG website:

  
    
        
   
 
]]>


Everything in the test.sample package with TestNG annotations will be included.

0
Comment actions Permalink

Another option is to run tng via ant, where you can specify a classfileset using the exact same syntax you want.

0

Please sign in to leave a comment.