New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android "viewModelScope.launch" block not fully covered for Kotlin 1.6.10 #1290
Comments
Do you get the same result with other versions? e.g. with
Are you sure? How we can verify this? Because of closed long time ago #1126 and #1123 we have to ask all those questions in the absence of complete reproducer from you. And in any case JaCoCo performs analysis of bytecode, so we can't investigate your case without looking at your class files - please provide at least them. |
@Godin I get the same result with |
Same as before - please understand that we can't verify this statement without complete reproducer / access to your project.
|
@Godin |
No this is not what is needed for investigations and not what was requested.
Either simply provide all class files as was requested, |
Even not taking into account that you don't provide description of steps to compile this project, it doesn't look like anyone other than you can easily build this project without modifications - here is what I tried
and it failed as following
So please either make it buildable by others, |
My sincere apologies. I have updated the project and have included the steps to get the Jacoco report in the README file. |
After following your steps
you can see following report please pay attention on the JaCoCo version at the right bottom corner of the report, After following modification of your apply plugin: 'jacoco'
+jacoco.toolVersion = "0.8.7" and execution
report is And so btw I highly suspect that statement about Kotlin version
was not true also. |
I am having the same issue on jacoco 0.8.7 with kotlin 1.6.10. In my report there are two similar methods with a unit test that does practically the same, the only difference is that one updates a Btw in my case the dispatchers only provide the default android kotlin dispatchers
And I am using the Turbine package to create the unit tests for this corroutine scopes |
You can't have exactly the same issue, because from your screenshot seems that you use JaCoCo 0.8.7 whereas issue discussed here was due to use of JaCoCo 0.8.6 instead of 0.8.7. So if you believe that something is still not working properly with 0.8.7, then please first create complete executable reproducer that others can try, and then share it with us by creating new ticket. |
Steps to reproduce
1.6.10
, the Jacoco reports for viewModelScope.launch { ... } block is always NOT fully covered.Expected behaviour
viewModelScope.launch { ... }
should be marked as fully covered by jacoco for Kotlin 1.6.10.Actual behaviour
The report says 2 of 3 branches missed for
viewModelScope.launch { ... }
block.The text was updated successfully, but these errors were encountered: