Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Junit errors.

 
jay vas
Ranch Hand
Posts: 407
  • 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: 34410
346
Eclipse IDE Java VI Editor
 
jay vas
Ranch Hand
Posts: 407
  • 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: 34410
346
Eclipse IDE Java VI Editor
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic