Green Bar with JUnit
After Getting JUnit from Git on a Mac I wanted to run all of JUnit's tests. Here's what happened.
First I opened the whole JUnit project in TextMate. TextMate is my editor of choice when I work with Groovy/Grails and Ruby/Rails. I do whole projects with it. For those kind of languages and frameworks Textmate is suiteable, but since JUnit is a Java project, TextMate's seems to be not enough.
I tried to run all the tests within JUnit with TextMate. There are some AllTests classes, but you can't run them from within TextMate easily, because you would have to deal with the classpath on your own. There's an Ant build file, but unfortunately without a
testtask. Tests seems to be only executed during a build, but I don't want to build JUnit everytime when I actually want to run all the tests.
In the build file I saw a reference to
org.junit.tests.AllTests. Again, it'd be a mess to build the classpath everytime I wanted to execute the AllTests class within TextMate. I switched to Eclipse after I upgraded to Eclipse 3.5.1.
There were already project files for Eclipse in the JUnit project, so I was able to be up with JUnit in Eclipse with a simple import. I executed
Alt+CMD+X Tand I saw a green bar with 481 tests. Yay!
Only the execution time wasn't that good. It took me ~23 seconds to execute all the tests, which is quite more than my expected less than 10 seconds.
At least I could run all of JUnit's tests now.