Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

clover is not recording classes under default package

Hi,

i am able to instrument and compile code by configuring clover in ANT build.xml file.

When i run my application manually after deploying the ear file  in Jboss 6, clover is able record and able to generate report for all the classes under any packages  but not for the classes under the default package(i.e. classes without any package).

 

Below is my clover settings in build.xml

 

<property name="clover.jar" location="C:/clover-ant-4.0.2/lib/clover.jar"/>
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
<target name="kewill-clover-clean" >
<echo>clover-clean</echo>
<clover-clean/> 
</target>
<target name="kewill-with-clover" >
<echo>with.clover</echo>
<clover-setup flushpolicy="interval" flushinterval="5000">
</clover-setup>
</target>
<target name="kewill-clover-report-html" depends="kewill-with-clover">
<clover-html-report outdir="clover_html"/>
</target>

<target name="kewill-clover-report-pdf" depends="kewill-with-clover">
<clover-pdf-report outfile="clover_coverage.pdf"/>
</target>

 package structure looks as below:

package.bmp

please suggest ,how to configure clover to record classes in base package

2 answers

0 votes

Could you please check whether:

1) Classes from a default package have been instrumented by Clover?

Run your build with debug logging (ant -d) and look for a message like

[clover] Processed '<path to your source file>' to '<temporary directory>\<source file>'

 

2) Classes from a default package have been included in an HTML report?

Run your build with debug logging (ant -d) and look for a message like

[clover-report] Rendering <source file> with renderer com.atlassian.clover.reporters.html.source.java.JavaSourceRenderer

 

3) Classes from a default package contain any executable code?

I'm asking about it because, by default, Clover does not show empty entities in a report (such as: interfaces with no default methods, enums with no methods, classes containing constants only etc).

 

Hi Marek,

thanks for your quick response.

I ran the ant build and the clover-report target using (-d ) option.

point 2 got failed,

1) Classes from a default package have been instrumented by Clover?

Yes, the classes are getting instrumented

i ran the ANT using -d option as you said the message is looking as below 

[clover] Processed 'D:\MCT\web-src\PhraseDyIO.java' to 'C:\DOCUME~1\user\LOCALS~1\Temp\clover8424359559670296414.tmp\PhraseDyIO.java'

2) Classes from a default package have been included in an HTML report?

Run your build with debug logging (ant -d) and look for a message like

[clover-report] Rendering <source file> with renderer com.cenqua.clover.reporters.html.source.java.JavaSourceRenderer

No, i am not able to find anything like that with above class in the debug log.

and also checked in the "clover_html" folder , there is a folder generated with "default-pkg",

which consists of html's and javascript files in which one html file is containing a class name which is under web-src folder

 temp.bmp

 3) Classes from a default package contain any executable code?

these classes are not interfaces , they are servlet classes extends httpservlet.

conatins normal methods

like :- 

public class PhraseDyIO extends HttpServlet{
dopost(){

}
}

 

 please suggest what's going wrong with remaining classes .

thanks

Kiran kumar

 

ad 1) OK ad 2) What Clover version do you use? How did you look for these messages? I'm asking, because in my example is pasted a log message from Clover 3.x, in which the JavaSourceRenderer is in com.cenqua.clover... package. In Clover 4.x the class is located in com.atlassian.clover... package. ad 3) So it's OK. May I ask you to create a ticket at http://support.atlassian.com and attach the entire build log (with 'ant -d') as well as the build.xml file? I'd love to investigate it further.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

146 views 1 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you