Questions tagged [eclemma]

EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License.

EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License.

See http://www.eclemma.org/

131 questions
54
votes
5 answers

Improve Lombok @Data Code Coverage

I am writing unit tests for my project and am trying to achieve at least 80% code coverage. Problem is that I am using lombok's @Data annotation for generating getters and setters and when I run my unit tests, all those getters and setters along…
Varun Sharma
  • 1,602
  • 1
  • 13
  • 37
40
votes
2 answers

Ignore code coverage for unit tests in EclEmma

I have configured EclEmma not to instrument my unit tests which works fine. However, the editor still highlights the test code as not covered. I want no highlighting in unit tests because they are not instrumented to detect coverage. How can I do…
David Harkness
  • 35,992
  • 10
  • 112
  • 134
30
votes
7 answers

Eclemma says 1 of 4 branches not covered, but which branch is it?

Is there a simple way to tell which branch I am missing? I.e. I have some code like this: if (x || y) { // do stuff } In the coverage highlighting there is a yellow dot in Eclipse that says: 1 of 4 branches missed but I would like to know…
tor
  • 636
  • 3
  • 7
  • 18
29
votes
2 answers

eclemma branch coverage for switch: 7 of 19 missed

I have this switch system and I'm using eclemma to test the branch coverage. We are required to have at least 80% in branch coverage for everything so I'm trying to test as much as possible. However, eclemma tells me this switch system is not fully…
Sytze Andringa
  • 413
  • 1
  • 4
  • 12
22
votes
1 answer

eclipse + m2e + junit + infinitest + eclemma?

I have Eclipse for Java Developer 4.3 with m2e, eclemma, infinitest. My project uses Eclipse m2e with junit 4.11. My intention is to have coverage info updated every time infinitest re-runs the tests affected by last save. Is it possible? At the…
Tair
  • 3,779
  • 2
  • 20
  • 33
19
votes
1 answer

How to exclude classes from the coverage calculation in EclEmma without actually excluding them from the coverage itself

I am using EclEmma to test the coverage of my scenario tests and use case tests on my project. I have a Base package which contains the most general classes and the use case tests. The coverage looks like this: What I want is to exclude the use…
Programmer1994
  • 955
  • 3
  • 13
  • 29
19
votes
3 answers

Code coverage in Java with EclEmma not scanning expecting exception methods

I'm trying to get my code coverage in java, using Eclipse and EclEmma. My tests are using JUnit 4 and I've got some tests looking like this : @Test(expected = IllegalArgumentException.class) public void…
Pacane
  • 20,273
  • 18
  • 60
  • 97
11
votes
1 answer

How to launch unit tests under EclEmma without using the VisualVM launcher with that launcher installed

I recently installed the "VisualVM Launcher" into my Eclipse IDE. After using that launcher to help profile some problems in my application, I tried to switch all of my configurations back to using the previous setup. However, whenever I launch my…
austinMLB
  • 85
  • 9
11
votes
2 answers

Excluding Synthetic Classes in Emma within STS

When trying to run Coverage as or run a maven build using emma:emma I get the following: java.lang.IllegalStateException: Could not access method: Can not set static final [Z field packageName.ClassName.$jacocoData to [Z So I searched around…
mstelz
  • 610
  • 4
  • 9
  • 19
11
votes
8 answers

Eclemma always reporting 0% of code coverage

I have a Maven test project for my application. The JUnit tests run fine, and the code coverage test run too. But the report always shows 0% of code coverage. What should i do?
renanleandrof
  • 6,699
  • 9
  • 45
  • 67
10
votes
9 answers

Error while loading coverage session (code 5001)

I got the following error when I am trying to check coverage using EclEmma, please help me out: Error while loading coverage session (code 5001). Error while analyzing package fragment root java at F/solo-repository/target/test-classes (code…
user5459039
8
votes
1 answer

EclEmma Line Number Output Java Eclipse Plugin

I installed EclEmma (Code Coverage Eclipse Plugin ) , When I build my code EclEmma Highlights code lines in order to they have been used or not in this running , my question is can EclEmma output the which line number has been executed and which…
ᴀʀᴍᴀɴ
  • 4,443
  • 8
  • 37
  • 57
7
votes
1 answer

How to properly run Eclemma coverage with Java

We use non-java tests. Each one of them executes our tool which is written in Java. I'm trying to use Eclemma for creating the coverage report of the tests. Lets start with one test. We compile the code with build.xml. I would like somehow to…
vesii
  • 2,760
  • 4
  • 25
  • 71
7
votes
1 answer

Aggregated Coverage or Coverage in the dependent modules not shown in SonarQube + Reports are generated by Jacoco

I am running jacoco plugin to generate html , xml and jacoco.exec reports to measure the coverage of the code tested by my testNg tests. I am successful in the generation of these reports in my local as well as in Jenkins and all my unit test…
JITHIN_PATHROSE
  • 1,134
  • 4
  • 14
  • 29
7
votes
4 answers

Gradle Jacoco Plugin Reporting Zero Coverage

I'm getting zero code coverage reported on a select group of classes, when running Gradle's Jacoco plugin. I have confirmed all unit tests, which tests these classes, have successfully ran. What is very interesting, is that EclEmma, in Eclipse,…
Eric
  • 487
  • 1
  • 6
  • 16
1
2 3
8 9