Code coverage on a live application

L

lethal.possum

Hello,

I would like to find unused code in an application while it is
running. I know tools like Clover but I've only used it with JUnit to
test the code coverage of my tests.

But this time the application is a client and I can't create unit
tests to simulate all the possible user actions and the server's
responses. So I'd like to monitor what lines of the code are executed
while real users use the application.

I can compile my application with debugging information so this it
should theoretically be possible to do this. I just don't know if
there is any tool to do it. Hopefully one of you already had the same
idea.

Thanks in advance for your help,

Thomas
 
J

Jean-Baptiste Nizet

(e-mail address removed) a écrit :
Hello,

I would like to find unused code in an application while it is
running. I know tools like Clover but I've only used it with JUnit to
test the code coverage of my tests.

But this time the application is a client and I can't create unit
tests to simulate all the possible user actions and the server's
responses. So I'd like to monitor what lines of the code are executed
while real users use the application.

Launching JUnit tests is not different from launching a Java
application. If you can instrument your code with Clover or Cobertura
and measure the code coverage of your tests, why couldn't you do the
same with your Java application?
Read http://cobertura.sourceforge.net/commandlinereference.html

JB.
 
L

lethal.possum

(e-mail address removed) a écrit :




Launching JUnit tests is not different from launching a Java
application. If you can instrument your code with Clover or Cobertura
and measure the code coverage of your tests, why couldn't you do the
same with your Java application?
Readhttp://cobertura.sourceforge.net/commandlinereference.html

JB.

Very good point, I should have thought of that!
I have been using Ant for so long that I'm forgetting the good old
command line sometimes ;)

Thanks for reminding me,

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top