You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the function getDetails(str) viewModelScope.launch it shows partially covered in sonarqube.
Not able to figure out how to cover.
It shows 1 of 3, so there are 3 cases that have to be covered in JUnit.
Assumption:
1 case - it can be the success of the launch - do(green)
2 case - it can be a failure - how to make viewModelScope.launch fail in JUnit?
3 case -?
function getDetails(string)=viewModelScope.launch {
//some code
}
Sorry, we are not familiar with sonarqube. It's better to ask on sonarqube mailing-list/stackoverflow as it seems to be a coverage-specific issue, not kotlinx.coroutines-related one
At the function getDetails(str) viewModelScope.launch it shows partially covered in sonarqube.
Not able to figure out how to cover.
It shows 1 of 3, so there are 3 cases that have to be covered in JUnit.
Assumption:
1 case - it can be the success of the launch - do(green)
2 case - it can be a failure - how to make viewModelScope.launch fail in JUnit?
3 case -?
function getDetails(string)=viewModelScope.launch {
//some code
}
Code in images links:-
https://i.stack.imgur.com/X43OU.png
https://i.stack.imgur.com/QSmdy.png
StackOverflow link - https://stackoverflow.com/questions/64594799/viewmodelscope-launch-shows-partial-code-coverage-in-sonarqube
kotlinVersion = '1.4.10'
coroutinesVersion = '1.3.0'
Jacoco - 0.8.6
sonarqube - 7.8
The text was updated successfully, but these errors were encountered: