wood burning stoves 2.0*
The moose likes Testing and the fly likes Junit errors. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit errors." Watch "Junit errors." New topic
Author

Junit errors.

jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

Can you post the error?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jay vas
Ranch Hand

Joined: Aug 30, 2005
Posts: 407
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

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

Joined: Jun 15, 2011
Posts: 103

Hi,

If you are using eclipse then you can use eclipse debugger to debug a junit test just like a normal java application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Junit errors.
 
Similar Threads
How do I test System.exit(-1)
Issues installing junit on linux
logging test messages
How to test persistence layer of a web based application?
In order to run junit 4.8.2 in maven do we need to have the folder src/test/java?