tags:

views:

41

answers:

3

I have some fairly complex java programs with lots of if/else statements where various components interact with each other. I have some test data which exercises the code as much as possible.

Is there a way for me to run my code against this data and get information about which code paths were and were not executed?

(by test files, I mean I literally have text based csv files with hundreds of thousands of lines. Think of these lines as a collection of parameters. I try to randomly generate these parameters to make sure all parts of my code are touched, but I'd like to be more sure since these programs have a high cost of failure)

+1  A: 

I'm not sure about code paths, but for simple code coverage Emma is good. Has plugins for most of the major IDEs and "just works".

Freiheit
+1  A: 

I think clover can do that

http://www.atlassian.com/software/clover/

Julio Faerman
+2  A: 

I use EclEmma (Emma Eclipse plugin) with TestNG in Eclipse. It provides a nice visual indication of what is and isn't covered, plus coverage statistics in the coverage view.

I believe JUnit is supported, too.

Jonathon
Yep, EclEmma supports JUnit also
matt b