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

Clover on J2EE: Manual Testing

I'm new to Clover and I would like to apply test coverage to a J2EE web application with Websphere server. I am wondering that is it possible to run it without providing junit test cases ? in other words, is it possible to execute test cases from the browser on the fly since it's a web application ? for example, the user will be clicking around on the browser, and Clover will be sitting on the back tracking which method or class from which servlet that is being called and excuted, and then generate a report at the end based on that.

If so, can you give me instructions or example on how to do it on Eclipse ?

2 answers

I have the same question. In our sprint lifecycle, progression of tests is as follows:

0. Develop unit (JUnit) tests

1. Sanity tests ahead of hand over to QA

2. QA tests

3. Full regression test (priori to FCS)

I would like to build uo coverage metrics cumulatively fro (0) through (3).

Would Clover enable me to do this? Pl note that tests (2) and (3) are most likely executed by hand (using the

web interface).

0 votes

Yes, you can measure code coverage for any code which has been instrumented, no matter whether it's executed as a unit test or manually.

In order to run server-based test you will need to change flushing policy to "threaded" or "interval" (unless you will shutdown Websphere). More details on Working+with+Distributed+Applications and Using+a+Flush+Policy pages.

In order to have single coverage report from all kinds of tests you have to merge clover.db files - e.g. via command line tool CloverMerge or Ant clover-merge task.

Please note that:

  • in case of manual testing, you won't be able to use test optimization feature (as there are no JUnit/TestNG testcases)
  • it's advisable to run manual/QA tests on development environment and not on production (as instrumentation adds memory/cpu overhead, might change race conditions etc)

I've just found this after asking myself

I've followed these isntructions with no coverage output being produced. Is there additional troubleshooting/debug information available?



I mentioned about merging of database files, but this has to be done after running tests. In general we have two approaches for multi-module builds:

  1. create separate clover.db for every module, run every module (they can be executed separetely), next merge coverage results into one cloverMerge.db (using the clover2:merge goal) and generate a coverage report or
  2. create single clover.db for whole application (using the singleCloverDatabase property for clover2:instrument or clover2:setup goals), run whole application, (no need to merge), next generate a coverage report


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...

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