Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Ant and JUnit work together?

 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have read that you can use JUnit along with Ant? This thing actually confused me!
And is a generic build tool which caters to compile time and JUnit is a testing tool which caters to runtime. I think i have interpreted the uses correctly.
Now how can one use jUnit along with Ant. Does ant have runtime capabilities also like executing the scripts, java programs, executables etc?
thanks,
 
Doug Wang
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ram,
Do check out the JUnit article page and the Ant resources page. You need not do any extra search.
Being a newcomer, the"Incremental development with Ant and JUnit" article may cater to you. The author gives a HelloWorld example.
Concerning your confusion, you may cusomize ant tasks at will due to the big power of ant(I'd like to say the power of XML).
Hope that helpful.
[ March 14, 2002: Message edited by: Doug Wang ]
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Doug,
Thats cool resource from IBM. Ant really rocks!
 
timothy zimmerman
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although Ant is a build tool, you can script it to execute java code (and other). So, at build time, once you have compield your new code you can then compile and run you unit tests so that by the end of the build process you have performed your unti tests as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic