On 1/2/07, Henrik Bærbak Christensen <h...@daimi.au.dk> wrote:
> Hi,
>
> I am presently writing a textbook and TDD is a major topic in the first
> part. I have used junit 3.8 so far but better move on to junit 4.2. However,
> as several others I miss the GUI based runners - in a textbook context the
> trick is to keep the number of topics low and introducing Eclipse just to
> get a visual feedback on the test cases is a bad pedagogical move.
Fine. Thats what I heard often by other people using JUnit.
> I was therefore delighted about your junitext but the
> junit-ui-runners-3.8.2.jar gives me some problems that you may help me
> solve:
>
> A) It seems it has not yet been ported to junit 4.2 but only works with 4.1?
I am just updating JUnitExt to JUnit 4.2. In principle, you can simple
change jar file. There is only one issue with one file missing in
junit-4.2.jar (excluded.properties), which may result in errors when
using reloading class loaders.
Will be fixed in JUnit 0.2.1.
> B) Even using the 4.1 I get the following warnings in the console:
> D:\eclws\book\src\chapter\tdd\iteration-1>java -classpath
> .;junit-4.1.jar;junit-
> ui-runners-3.8.2.jar junit.swingui.TestRunner TestPayStation
> Warning: could not load "icons/failure.gif" icon
> Warning: could not load "icons/error.gif" icon
> Warning: could not load "icons/failure.gif" icon
> Warning: could not load "icons/error.gif" icon
> Warning: could not load "icons/error.gif" icon
>
> Have you any idea how to avoid these warnings?
This is a bug. The resources are simple missing in JAR file. I posted
an issued to project issue tracking (at Google Code hosting:
http://code.google.com/p/junitext/).
Will also be updated in 0.2.1, coming next day.
Bye, Jochen
JUnitExt 0.2.1 which fixes your bug found has been released now.
See www.junitext.org for latest information.
If you are interested about news, subscribe to "junitext-dev" at
Google Groups. Bugs and enhancement requests should be posted to
project home page too. See http://code.google.com/p/junitext for more
information.
Much fun, Jochen
Thank you for your speedy response!
However while the missing icon problem has been fixed there is still a
problem with running with 4.2
the following command
java -classpath .;junit-4.1.jar;junit- ui-runners-3.8.2.jar
junit.swingui.TestRunner TestPayStation
works all right
but changing to the new 4.2 jar
java -classpath .;junit-4.2.jar;junit-ui-runners-3.8.2.jar
junit.swingui.TestRunner TestPayStation
throws a java.lang.ClassCastException
I have compiled the test class with the junit 4.2 jar in both cases. the
junit-ui-runners jar file size is 71.930
and has modification time 20:30 january 3rd so I do not think I have made a
copying error of your jar file.
Any ideas?
Regards
- Henrik -