Avatar of AnjaliW
AnjaliW

asked on 

code coverage

Few questions which I am confused with:

1.Does code coverage happens  on JUNIT Classes?
2.If so ,then will it give all report where that JUNIT invokes other java sources.
3.If I am running Junit and then need to do code coverage on that testclass what should I have to DO?
4.Which command to execute to get code coverage of that JUNIT.
SoftwareJavaProgramming Languages-Other

Avatar of undefined
Last Comment
AnjaliW
Avatar of ksivananth
ksivananth
Flag of United States of America image

>>1.Does code coverage happens  on JUNIT Classes?

basically it checks how much actual code is tested/invoked by unittests.

>>2.If so ,then will it give all report where that JUNIT invokes other java sources.

depends the tool you use

>>3.If I am running Junit and then need to do code coverage on that testclass what should I have to DO?

there are bunch of free and proprietary code coverage tools, EMMA is such one search google and choose the best one fit for you.

4.Which command to execute to get code coverage of that JUNIT
Avatar of AnjaliW
AnjaliW

ASKER

As said ..it checks actual sources has been covered  by test.
If I provide jar's of sources in there dependencies..then will it still do coverage of that classes inside jars. or it requires classes "target/classes/..." to instrument those classes.

In my scenario...it is not creating coverage report at target/cobetura directory...says no classes for instrumentation........

I am using Cobertura plugin....
ASKER CERTIFIED SOLUTION
Avatar of ramazanyich
ramazanyich
Flag of Belgium image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of AnjaliW
AnjaliW

ASKER

thx!
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo