I am using Cobertura for my code coverage but while running the test cases all of the test cases are getting failed with below error when I run the test cases using a maven build.
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 033d 11ff ff3e 125b 1102 1fb8 0061 2a2b
0x0000010: 1102 1f3d 1100 003e c600 1912 5b1c 1d04
0x0000020: b800 b511 ffff 3e2b b600 bbc0 00b7 a700
0x0000030: 141d 9b00 0f12 5b1c 1d03 b800 b511 ffff
0x0000040: 3e01 b500 c012 5b11 0220 b800 61b1
But when I run the same test cases using Eclipse run as JUnit command it works fine.
In Eclipse just Right Click & in in cover configurations & add
-XX:-UseSplitVerifier to the VM Arguments in the arguments tab
In my case, using AdoptJDK 11, I was able to get rid of the error using the -noverify VM argument. However, Cobertura doesn't support Java 1 :(
For Gradle users:
test {
jvmArgs '-noverify'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With