• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ant-junit batch test  RSS feed

 
rakesh sugirtharaj
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When i do a batch test using ant junit task, why do i have to include .java files in my fileset?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rakesh,
You don't. The JUnit batch task uses compiled code (.class or .jar files.)
 
rakesh sugirtharaj
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

I found this in 'JUnit in action' book and also in junit-ant task document. The build code goes like this
Kindly explain.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rakesh,
This example uses .class. I also have a couple working examples with .class. I tried changing one of them to .java and it couldn't find the test. I'm inclined to think the manual has a typo.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37462
537
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just noticed this is more likely to get a response in the Build forum rather than the Testing one. Moving now.
 
rakesh sugirtharaj
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

Thanks for the link. But my code worked perfectly when i used .java files in my fileset.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm only going of the Javadoc for the latest version of ANT here and it reads:

"Define a number of tests based on pattern matching.

batchtest collects the included resources from any number of nested Resource Collections. It then generates a test class name for each resource that ends in .java or .class."

see here for details.

Looks like it works for both (using the latest version of ANT)?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!