Missed Team ’24? Catch up on announcements here.

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

Clover plus IntelliJ 2018.3: "Toggle build with Clover" button does not work?

Leslie Zobel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 15, 2019

I did the following:

  1. Went to http://openclover.org/doc/manual/latest/idea--installation-guide.html

  2. Followed the instructions for "Installing the plug-in manually" (when I tried the native plugin installation I got a version that required a license)
  3. Restarted IntelliJ
  4. Clicked (enabled) the "Toggle build with Clover" button, rebuilt when prompted
  5. Ran my tests
  6. Refresh coverage (green arrows)

I do not see coverage.  I can confirm that no file is created in the .clover directory.

In order to get coverage, I have to change the Flush Policy.  It doesn't matter what I change it to -- I just have to change it, then rebuild when prompted.  When I do that, coverage shows up.

Then once I have coverage that shows up, when I click (disable) the "Toggle build with Clover" button, it is still compiling with instrumented code.  So I get this compilation error in every instrumented class:

Error:(121, 2835) java: package com_atlassian_clover does not exist

The only way to get rid of this error is to change the Flush Policy (doesn't matter to what, I just have to change it).  Incidentally, when I do this, I still see red/green/gray code highlights and gutter marks, even though the code is not instrumented.

FWIW, my settings are:

Preferences -> Clover (project settings)
        Check "Enable Clover"
        Compilation tab:
                InitString --> Automatic
                Flush Policy --> (doesn't matter)
                Check "Instrument test source folders..."
                Instrument lambda functions --> none
                Rebuild Policy --> Ask
        View tab
                Refresh policy --> Manual
                General --> Check "Show source highllights"
                Per-test Coverage Data --> Check "Load per-test coverage data..."
        Contexts tab:
                Nothing here

Preferences -> Build, Execution, Deployment -> Compiler
        Uncheck "Compile independent modules in parallel"

 

1 answer

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2019

Clover has been never tested with Intellij IDEA 2018, so this may be some compatibility problem. Watch https://bitbucket.org/openclover/clover/issues/68/support-idea-2017-and-2018

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events