-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Mocking framework use case
It is common for a mocking framework (such as PowerMock/EasyMock) to modify a class under test to intercept code, such as a static class method being called to a stub/mock. This changes the CRC hash of the class bytes, hence the Analyzer (in reporting) can not match the code executed with the original class code. The report will then show no coverage for the class under test.
Is it possible to enhance the Analyzer to merge the coverage data from the modified class into a record for the original class? I'm thinking of an option in a report to use an alternate ExecutionDataStore that permits this type of merging.
I understand that instruction/statement level coverage data might be incorrect / unaligned, however we'd see great value in class and method level coverage reporting.