This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Junit errors.

 
jay vas
Ranch Hand
Posts: 407
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys : When junit fails in error (not in failure).... How does one go about debugging ?

I haven't found a log file anywhere... maybe im missing something. and I have a test that , literally, just abruptly ends with an error and failure message. It reports, as the error message, some sort of reflection related error message. I have even made the entire class empty.

I assume it is path related... but I have no idea how why this particular package, which is similar to other packages in my source tree, is not seen by junit (all packages are apropriately nested underneath the test/ folder in my build).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
 
jay vas
Ranch Hand
Posts: 407
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, the error is alas gone, i deleted the file.

I really wish i had been able to find out the "real" cause. In general.... is there a reason junit would crash due to a reflection error on an empty unit test which did not throw exceptions?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It shouldn't which just tells us that it was something subtle. I'm glad your error went away "by itself" but agree that makes it more of a mystery!
 
Arka Sharma
Ranch Hand
Posts: 103
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

If you are using eclipse then you can use eclipse debugger to debug a junit test just like a normal java application.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic