cli icon indicating copy to clipboard operation
cli copied to clipboard

Coverage has significantly decreased after Nx update

Open Tlacenka opened this issue 1 year ago • 1 comments

What happened?

The code coverage score has decreased by 30 points after Nx update.

What would you expect to happen?

The score would correctly update to the changes (no big fluctuation was expected).

Code PushUp package version

0.25.4

What operation system are you on?

Linux

Node version

20.0.0

Relevant information

The coverage is lower when running the plugin locally as well. image

Tlacenka avatar Mar 12 '24 19:03 Tlacenka

Check if related to #540

vmasek avatar Mar 25 '24 13:03 vmasek

I found out what the issue is.

We are providing both unit test and integration test results from the CLI to the plugin. However, inside the plugin, there is no logic that would merge results if the same source file is found in multiple reports. So, currently, the score is calculated from unit tests and integration tests as if they belonged to different projects. And issues are created for both separately.

What needs to happen is to merge results should a file be covered by different types of tests. And calculate the coverage score and issues only once all results are merged.

Tlacenka avatar May 28 '24 16:05 Tlacenka