istanbul-middleware icon indicating copy to clipboard operation
istanbul-middleware copied to clipboard

Coverage drops during test execution

Open Lewisprince opened this issue 10 months ago • 0 comments

I am using an end-to-end UI testing tool (Crawljax https://github.com/crawljax/crawljax) to test some web pages. I instrumented the source code using Istanbul and collected coverage through Istanbul-middleware after each time a UI action was fired. The test process continues for 30 minutes and the coverage is expected to keep increasing for the whole test process.

However, I found that the coverage drops several times while testing an app Pagekit (https://github.com/pagekit/pagekit). I found this is because the code is not fully counted early in the test process, causing the denominator to change (e.g., 54.92%, 402/732 --> 49.55% 546/1102).

I do not know why this happens since I instrumented the apps from their source code, and all code should be counted at the very beginning. Could anyone help me?

Best regards, Lewis

Lewisprince avatar Apr 03 '24 07:04 Lewisprince