Java code coverage(Jcoverage or cobertura)

i am using a tool cobertura(devoloped based on JCoverage) for testing the java code(how much percent of code is getting used).

are these tools are applicable only in association with Junit kind of testing tools?

or

can i use cobertura to find the code coverage of a .class file(suppose A1.class) by executing the .class file manually with

"java A1" command after setting the environment for the respective tool cobertura

some body please help me

thanks

ranu

[510 byte] By [LoveOpensourcea] at [2007-11-27 9:37:55]
# 1

> i am using a tool cobertura(devoloped based on

> JCoverage) for testing the java code(how much percent

> of code is getting used).

>

> are these tools are applicable only in association

> with Junit kind of testing tools?

> or

> can i use cobertura to find the code coverage of a

> .class file(suppose A1.class) by executing the

> .class file manually with

> "java A1" command after setting the environment for

> the respective tool cobertura

> some body please help me

> thanks

> ranu

What exactly do you think is going to "cover" your code, if you aren't running tests?

macrules2a at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...
# 2

i think running a test can be running a .class file.

but i getting zero code coverage of my .class file

the process i followed was

1)set up environment of cobertura tool(child of JCoverage)

2) run my .class file

3)check the index.html(for result of code coverage)

LoveOpensourcea at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...
# 3
> i think running a test can be running a .class file.You might. JCoverage doesn't
georgemca at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...
# 4
what is the better way to find the test coverage by JCoverage?
LoveOpensourcea at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...
# 5
> what is the better way to find the test coverage by> JCoverage?My preferred way is as part of a CruiseControl build
georgemca at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...
# 6
> what is the better way to find the test coverage by> JCoverage?actually run some tests in combination with it.Sheesh, you're not testing anything and still wondering why your testcoverage is zero?
jwentinga at 2007-7-12 23:10:14 > top of Java-index,Java Essentials,Java Programming...