emma

ClassFormatError using JMockit with EMMA

时光总嘲笑我的痴心妄想 提交于 2019-12-05 22:53:29
I am trying to use EMMA to measure coverage of some JUnit tests that use JMockit. But when I try to run the JMockit tests after instrumenting with EMMA, about a quarter of the tests fail with the following error: com.logstorage.engine.sensor.SensorManagerTest.setUpBeforeClass(SensorManagerTest.java:98) java.lang.ClassFormatError at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method) at sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:150) at mockit.internal.RedefinitionEngine.redefineMethods(RedefinitionEngine.java:152) at mockit.internal

Partial EMMA code coverage in Scala Case Class for IntelliJ IDEA 10.5

戏子无情 提交于 2019-12-05 08:03:54
I'm using IntelliJ IDEA 10.5 with the Scala plugin v0.4.1338 updated on August 14th, and Scala 2.9.0.1. I recently began using the EMMA test coverage utility in IDEA to generate coverage reports. I cannot determine why the constructor line of my Scala case class is only showing partial (yellow) coverage. I have looked in the EMMA FAQs and researched the matter online with no success. Does anyone have any idea how I can reach 100% coverage on a case class? case class A(a: Any) generate a number of methods for you, among them: A#equals A#canEqual A#hashCode A#toString A#productPrefix A

How to force Emma code coverage report to ignore some methods?

只愿长相守 提交于 2019-12-04 22:55:36
Some methods, such as auto-generated getters, setters, equals and toString, are trivial for test. However, if they aren't added into the testing classes, the code coverage percentage (calculated using Emma) is reduced and may crash our system build. How can I force emma to ignore these methods in the code coverage percentage? Regards, Felipe From the EMMA FAQ : A feature to allow EMMA users to mark arbitrary methods as excluded from coverage is being considered for future versions. So unfortunately this doesn't seem to be possible at the moment. There's an open feature request for this in EMMA

Emma does not generate coverage.ec

天大地大妈咪最大 提交于 2019-12-04 14:47:05
I setup Emma and it used to work for me. Then we had source code changes and now it doesn't generate coverage.ec at all. It does generate coverage.em . Near the end of testing, it has error messages: [exec] INSTRUMENTATION_CODE: 0 [echo] Downloading coverage file into project directory... [exec] remote object '/sdcard/coverage.ec' does not exist BUILD FAILED /var/lib/jenkins/android-sdk-linux_x86/tools/ant/build.xml:1056: exec returned: 1. Line 1056 of build.xml is "{adb}" failonerror="true". I see that I do have coverage.em on the desktop, which means my code are instrumented. the command I

How can I use filter for emma when building Android test with ant for a library project?

本秂侑毒 提交于 2019-12-04 10:37:31
From this question : How can I use filter for emma when building Android test with ant? I know emma can use a filter by adding the following lines to my ant.properties of the targeted project, not the test project, emma.filter=-com.your.excluded.package.* but it seems it doesn't work properly if my target project is a library project. My workspace looks like this: projectlib1 : lib project using lib2 projectlib1/tests : unit tests for lib1 projectlib2 : lib project using lib3 projectlib2/tests : unit tests for lib2 projectlib3 : stand alone lib When I run coverage for lib1 I also get coverage

Can fully covered code have an EclEmma coverage rating of less than 100%?

喜欢而已 提交于 2019-12-04 03:31:19
问题 I just wrote some simple sample code to make sure that I had EclEmma installed correctly. I'm not getting 100% coverage, and I don't understand why. The highlighting implies that it has to do with the class name. Here's my code, with corresponding JUnit tests, the way EclEmma highlighted it: The coverage results show that three instructions in Arithmetic aren't getting hit, even though both actual methods seem to be completely covered: I've read the EclEmma documentation about basic block

Code coverage for Android (calabash-android BDD)

巧了我就是萌 提交于 2019-12-03 16:45:38
I'm testing my android application using calabash-android which provides it's own "test project", with a script that renames it's package to reflect the app under test, and then uses an InstrumentationTestRunner subclass: adb shell am instrument -w -e class sh.calaba.instrumentationbackend.InstrumentationBackend #{ENV['TEST_PACKAGE_NAME']}/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner I'll accept any answer that allows me to generate a code coverage report similar to Emma or Cobertura for an Android app, with data collected while being tested in calabash-android. In

IntelliJ 12 code coverage not working in editor for GWT Projects

谁都会走 提交于 2019-12-03 13:13:30
I'm trying IntelliJ 12, and I can't manage to get the line colored (red, green, yellow) in the editors after running the tests with coverage. Did anybody noticed the problem or it's just me not being able to make it work? By default code coverage results are displayed only in the left gutter and may be hard to notice: You can either change the gutter colors or configure IntelliJ IDEA to change the background of the whole lines (instead of the foreground) depending on their coverage status: Now it's much easier to see the coverage status: Finally I found out what was causing IntelliJ IDEA 12.0

Code coverage for Android [duplicate]

人走茶凉 提交于 2019-12-03 05:41:36
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Android test code coverage, Eclipse Its really frustrating to see there is no documentation for how to use EMMA for Android apps in Eclipse. Has anyone managed to work with EMMA in eclipse for Android apps? Without checking out the whole android source and do all the hackery? 回答1: If you have <path to test project>/build.xml file rename it. I was able to generate test coverage report by executing following from

Java 7 with emma and junit causing java.lang.VerifyError and Illegal local variable Errors

二次信任 提交于 2019-12-03 05:36:58
So I'm getting these errors [junit] Illegal local variable table length 17 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.AppenderLayoutTest.()V [junit] java.lang.VerifyError: Expecting a stackmap frame at branch target 11 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.StressTest.()V at offset 4 [junit] java.lang.ClassFormatError: Illegal local variable table length 17 in method test.nz.ac.massey.cs.sdc.log4jassignment.s06005586.AppenderLayoutTest.()V And I would like to know how I can fix it... What I've Read: Java 7 JVM VerifyError in Eclipse Testng, Emma,