Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse + Junit 4.4 + JunitReport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse + Junit 4.4 + JunitReport" Watch "Eclipse + Junit 4.4 + JunitReport" New topic

Eclipse + Junit 4.4 + JunitReport

Jorge Bendahan
Ranch Hand

Joined: Apr 11, 2008
Posts: 82
Hi, i�m trying to generate some reports(html or pdf), i�m aware that this can be done with ant, in fact i�m doing this right now, but writing an ant script and calling it from the command line is not exatcly what i need, since i�m working with eclipse and writting and excecuting the tests from it�s built in test runner, i want to generate the reports from eclipse each time i run the tests and keep saving the results, i dont know how to do this, i know how to work with ant tasks, but i dont know how to work with ant tasks from within eclipse.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

You can run Ant scripts from Eclipse using the "External Tools" menu. I'm going to move this to our IDEs forum since it is about Eclipse/Ant interaction rather than testing.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

The Eclipse Java perspective knows about Ant and has integrated support, so you don't need to run it as an external tool. Just right-click on the build.xml file in the Navigator view and select the appropriate Ant run option.

Some ant scripts may require external information such as command-line properties or classpaths. The integrated Ant support supplies a dialog that can be used to configure that kind of stuff.

An IDE is no substitute for an Intelligent Developer.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Tim Holloway:
The Eclipse Java perspective knows about Ant and has integrated support, so you don't need to run it as an external tool.

Well, the Eclipse's Ant support actually *is* filed under "external tools". So I guess you and Jeanne are talking about the same thing.

I don't think there is an easy way to hook into the Eclipse JUnit runner, though. For that, you'd probably write an Eclipse plugin or something.

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
I agree. Here's the link:
subject: Eclipse + Junit 4.4 + JunitReport
It's not a secret anymore!