aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes IntelliJ 4.0, Ant and JUnit 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 "IntelliJ 4.0, Ant and JUnit" Watch "IntelliJ 4.0, Ant and JUnit" New topic
Author

IntelliJ 4.0, Ant and JUnit

Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

So, I'm running my JUnit tests via Ant inside IntelliJ IDEA 4.0.

Two things are bothering me:

1- when I run the script it executes each of the targets and lists them in the ant window (all fine and good). The problem is, it lists all the targets collapsed, and I'd like to see the results of the Junit tests. So, by default, I'd like it to expand the "test-junit" target.

2- if the junit tests fail, it should say the build failed too -- but it doesn't! It says "build successful" and because of problem #1, I don't know that the build really failed until I click on the "test-junit" target.



- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Why are you doing this instead of using the nifty built-in graphical TestRunner, which presents a live-updated results window with timings, error messages, etc, and clickable stack traces, even?


[Jess in Action][AskingGoodQuestions]
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

umm cause the other guys on my team all use Eclipse so to make it so everyone can build and test stuff, everything goes in the ant scripts

But -- you're the 2nd person who's said that to me, so -- looks like I'll need to use the nifty built-in junit runner if I want what I said...
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Our project is Makefile-driven; we have makefiles that build everything and run tests. They're used by the nightly builds, and I'll occasionally use them myself. But when I'm testing in IDEA, I just use the native JUnit runner. So we have both, too. Never been a problem.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Jess,

Out of curiousity, what does your Ant task that runs the JUnit tests look like?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IntelliJ 4.0, Ant and JUnit