Closed mustafaozhan closed 1 year ago
Hi, sorry for the delay, could you please indicate the names of the functions whose coverage disappeared after the changes were made? The final coverage takes into account only the function invokes of your project, the function calls of the standard library are not included in the report.
A call of this type does not affect the percentage of coverage in any way because no project functions are called inside the block.
assertTrue { it is SomeClass }
Hello @shanshin thank you for your message, meanwhile I think I put the title wrong, just updated.
So here are my reports: https://codecov.io/gh/Oztechan/CCC/compare/d7295893f5b302e5293da52a671a9fc6cc76aa56...8144e243a3fa7c305005c4c5c3b544f7b360b08d/diff
in case you are not able to see the reports, I am attaching a sample screenshot too:
As you can see, all the new lines are partially covered and overall class coverage is decreased.
@mustafaozhan, do you use only codecov to analyze the percentage of project coverage?
@shanshin I use also Codacy, but it is not showing detailed like codecov does, according to Codacy only %74 percent of my total changes are covered, assuming that in the PR I only replaced
assertTrue { it is SomeClass }
with
assertIs<SomeClass>(it)
It sounds like Codacy is also decreasing my Coverage.
But I think it is normal, at the end I use same xml report generated via Kover and upload it to both platform.
Usually evaluating coverage for tests from commonTest
source set not make sense. In the future releases, this will be excluded from the report (same as a test
source set).
It was not possible to reproduce the error locally
assertIs<Any>(it)
the line is completely covered.
Perhaps the problem is in displaying coverage in codecov, an example of an XML report would be useful.
Hey @shanshin here is my coverage report, I couldn't upload here.
Thanks!
Fixed in agent version 1.0.674
Fixed in 0.6.0
, feel free to reopen if the problem reproduced again.
Hello 👋
I have recently moved my all asserts below
with
assertIs
is an inline method in Kotlin Stdlib and covered: https://github.com/JetBrains/kotlin/blob/6a670dc5f3/libraries/kotlin.test/common/src/test/kotlin/kotlin/test/tests/BasicAssertionsTest.kt#L323-L357 But my overall coverage decreased. It seems like Kover is not recognizing this for the inline methods. It behaves like I do own this method, and there is no test written for inline methods of other libraries.In case you want to see the PR: https://github.com/Oztechan/CCC/pull/511