Meaningless Drivel is fun!*
The moose likes Testing and the fly likes Running a JUnit test case using Ant in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Running a JUnit test case using Ant in Eclipse" Watch "Running a JUnit test case using Ant in Eclipse" New topic
Author

Running a JUnit test case using Ant in Eclipse

Abder-Rahman Ali
Ranch Hand

Joined: May 22, 2008
Posts: 138
If I have a "JUnit", how can I run it using "Ant" in Eclipse?

Thanks.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Why do you want to use Ant?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Abder-Rahman Ali
Ranch Hand

Joined: May 22, 2008
Posts: 138
Ilja Preuss wrote:Why do you want to use Ant?


Because I want to automate the testing process (task), in addition to another tasks like (Compile,...etc).

Thanks.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Just create your ant script and configure an external tool builder for it: http://wiki.eclipse.org/FAQ_How_do_I_create_an_external_tool_builder%3F

Or consider using JUnitMax: http://www.junitmax.com/junitmax/subscribe.html
Abder-Rahman Ali
Ranch Hand

Joined: May 22, 2008
Posts: 138
Ilja Preuss wrote:Just create your ant script and configure an external tool builder for it: http://wiki.eclipse.org/FAQ_How_do_I_create_an_external_tool_builder%3F

Or consider using JUnitMax: http://www.junitmax.com/junitmax/subscribe.html


Thanks.
Seamus Minogue
Ranch Hand

Joined: Jun 24, 2008
Posts: 41
http://ant.apache.org/manual/OptionalTasks/junit.html


is also another good source for you with a nice little example at the bottom.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running a JUnit test case using Ant in Eclipse
 
Similar Threads
Juint task in Ant
ant junit
Junit with ant
Creating mock objects in JUnit testing
problem using junitreport in Eclipse