eclemma

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

孤人 提交于 2019-11-29 04:03:48
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 case tests (e.g. BugReportTest) from the coverage calculation. But I do want the tests inside it to be considered. I know how to exclude the entire class from the coverage but if I do that, my coverage % drops because the actual tests that check which lines of my code are tested are forgotten. These use case tests do need to stay in the Base package

eclemma branch coverage for switch: 7 of 19 missed

感情迁移 提交于 2019-11-29 02:56:22
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 tested in terms of branch coverage. pos = p.getCurrentPosition().substring(0, 1); switch (pos) { case "G": goalkeepers++; break; case "D": defense++; break; case "M": midfield++; break; case "F": offense++; break; case "S": substitutes++; break; case "R": reserves++; break; } I used straightforward JUnit tests to go trough each of these cases. Still

Ignore code coverage for unit tests in EclEmma

家住魔仙堡 提交于 2019-11-28 22:30:25
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 this? Martin Matthews I did this in Preferences->Java->Code Coverage and set the "Only path entries matching" option to src/main/java - seems to work nicely. The include/exclude filter settings in the Preferences window apply to class name/package patterns for all projects. To control the files at the folder/path level you must set it per-project.

Eclipse with ADT - JUnit Test Not Running With EclEmma

限于喜欢 提交于 2019-11-28 11:18:17
问题 I am currently running Eclipse Juno with the Android Development Tools plugin so I can develop Android applications and test them. To get code coverage of the applications (and preferably the APIs of Android themselves), I installed EclEmma into Eclipse, but just when I was about to run it for the first time, it gives me an error: Error while dumping coverage data (code 5013). Socket closed I don't know what might be causing this, and when I looked it up here, the workaround didn't seem to

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

六眼飞鱼酱① 提交于 2019-11-27 17:51:58
问题 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 case tests (e.g. BugReportTest) from the coverage calculation. But I do want the tests inside it to be considered. I know how to exclude the entire class from the coverage but if I do that, my coverage % drops because the actual tests that check which

eclemma branch coverage for switch: 7 of 19 missed

99封情书 提交于 2019-11-27 17:13:36
问题 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 tested in terms of branch coverage. pos = p.getCurrentPosition().substring(0, 1); switch (pos) { case "G": goalkeepers++; break; case "D": defense++; break; case "M": midfield++; break; case "F": offense++; break; case "S": substitutes++; break;

Ignore code coverage for unit tests in EclEmma

扶醉桌前 提交于 2019-11-27 14:21:27
问题 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 this? 回答1: I did this in Preferences->Java->Code Coverage and set the "Only path entries matching" option to src/main/java - seems to work nicely. 回答2: The include/exclude filter settings in the Preferences window apply to class name/package patterns