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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

I want to coe covergae of my test case which used SingleLaunchActivity in android

public class MyActivityTest extends SingleLauncgActivtiy<MyMainProjectClassName> {

public MyActivityTest () {
super("", MainMeasureAndRecordActivity.class);


2 answers

1 accepted

1 vote
Answer accepted

Hi, here's some tutorial describing how to turn on experimental code coverage for Android platform. However keep in mind that Android OS is not officially supported.

Hi Grzegorz, the link you have provided is not understandable. Can you please share any example android code or example working script? 

Please help me out on this below questions..

How to generate instrumented Java classes of Android app from code? 

How it will generate the Clover.db file? and how to built the apk with the instrumented classes? 

Please help me out on this, Thank you!! Really appreciate your efforts !! 


Hello, here you have example code and tutorial how to integrate Ant or Maven with Clover. Regarding Java instrumentation, you can read about it in any of the following tutorials (depending which integration you'd like to use):

Proper source code instrumentation will generate clover.db which you can use. In order to build apk archive from instrumented sources, you need to follow any other typical build procedure. The only difference will be that you need to use instrumented sources, not the original ones.

Hi @Grzegorz Lewandowski, I am looking for specific android example code?

If you have such code, can you please paste the link for the code? 

Thank you so much!!

I am trying through command promt

C:\Temp>java -Dclover.license.path=C:\Path\clover.license -cp C:\Temp\clover-run
time.jar com.cenqua.clover.CloverInstr ...
Error: Could not find or load main class com.cenqua.clover.CloverInstr

getting highlight error ..

I have db as well as their content.

Now from the command line i have to genrate report.

Can you please tell me the process.

I have clover.db + some file generated their.



Hi, you're trying to invoke CloverInstr main class but most probably it's not in the classpath. Please, make sure clover.jar is in the classpath of that java invocation. Please take a look at this Oracle tutorial how to achieve it.

My claspath of jave is 

C:\Program Files\Java\jdk1.7.0_45

so inside their is lib folder

I paste my colver .jar their 

After that i ran my command prompt

C:\Temp>java -Dclover.license.path=C:\Path\clover.license -cp C:\Temp\clover-run

Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
set a system property
enable verbose output
-version print product version and exit
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
enable assertions with specified granularity
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
load native agent library by full pathname
load Java programming language agent, see java.lang.instrument

show splash screen with specified image
See for m
ore details.

C:\Temp>time.jar com.cenqua.clover.CloverInstr ...


I am getting above error.


Can u please elaborate in step by step


Thanks u so much for guding

It not working at all .

I have a android project in eclipse which have a test class like below

public class MainMeasureAndRecordActivityTest extends SingleLaunchActivityTestCase<MainMeasureAndRecordActivity> {

private static MainMeasureAndRecordActivity activity;
private long projectId;
private ContentResolver contentResolver;
private long jobId;
private long projectUUID;
private Station station;
private long stationId;
MainMeasureAndRecordActivity activity2=new MainMeasureAndRecordActivity();

public MainMeasureAndRecordActivityTest() {
super("", MainMeasureAndRecordActivity.class);


Error I am geeting SingleLaunchActivityTestCase not defined.I have to show my client at any cost.


Can you please help me out.

Suggest an answer

Log in or Sign up to answer
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...

147 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