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 for eclipse, no test contributions

I installed the trial version of Clover some days ago, according to the directions in the installation guide. Then I marked my project as a clover-enabled project. Whenever I run some simple test from my src/test/java directory (it's an imported maven project) I hope to see the test included in the test contributions view, but it doesn't happen. No matter what I try: the 4 clover views (Coverage explorer, Test run explorer, test contributions, clover dashboard) remain empty. Is it related to my project using aspectj (I read somewhere clover and aspectj don't go along well), or am i missing something simple?

3 answers

1 accepted

0 votes
Answer accepted

Clover does not support AspectJ (unless you have AspectJ and Java source files fully separated, i.e. no AspectJ annotations in Java).

How did you import your Maven project into Eclipse? How do you run build and tests? Using Maven command or using Eclipse builder? Please note that Clover requires that "Java builder" is used (you can check it in project's properties).

Do you keep application and test code in the same project?

Hi Marek,

Thanks for your response!

1) Clover does not support AspectJ: that's a showstopper for my evaluation, as we shouldn't have to change our architecture to be able to run a coverage tool

2) How did you import your Maven project into Eclipse?

Did a 'mvn clean install' on a command line, and used 'import maven project' from the file menu in eclipse

3) How do you run build and tests? Using Maven command or using Eclipse builder? Please note that Clover requires that "Java builder" is used (you can check it in project's properties).

I see 3 builders: Aspectj builder, Maven Project Builder and Clover No-java builder

4) Do you keep application and test code in the same project?

We have a separate test project containing the integration and system tests. To evaluate clover I started by using some small unit tests included in the same project, but even those didn't produce anything

> Aspectj builder, Maven Project Builder and Clover No-java builder

This is a reason why you don't see Clover stuff. Your project is incompatible with Clover I'm afraid.

The only thing you could do is to instrument sources 'manually' (using CloverInstr or <clover-instr/> for instance) and next import such instrumented sources into Eclipse. It's similar as presented on the diagram for Instrumenting+RCP+Application.

Please could you provide more detailed steps to resolving this situation using the manual instrumentation approach?

Hi Michael,

As described in the "Instrumenting+RCP+Application" manual, the trick is to run <clover-instr/> in order to produce an instrumented version of Java sources and to put them into another workspace, keeping the original directory structure as well all non-java files you'd normally need (resources for example).

As Clover instrumentation in based on the source code and not on the byte code (as Cobertura or Emma does, for instance), such instrumented sources should be "transparent" for AspectJ (because they look just like the normal source code, but a just more complex).

Thanks to this, you shall be able to compile such instrumented sources using AspectJ. As soon as such instrumented code will be executed, Clover's coverage recorders should start recording code coverage.

Please let me know at which point exactly from this manual you got stuck.

Cheers
Marek

0 votes

Update: 

Clover (unofficially) supports the AspectJ language now. Try the new Clover AspectJ Compiler tool:

https://confluence.atlassian.com/display/CLOVER/Clover+AspectJ+Compiler

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Learn how to request and manage app requests in the Marketplace

G’day everyone! Super exciting news coming from the Marketplace. We have now fully rolled out the ability for end-users to submit app requests to admins directly from within the product! No longer ...

23 views 1 3
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