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
Devrath edited this page Oct 25, 2023
·
8 revisions
Scenario
Most of the time we come across scenarios where the system under test(SUT) is a normal function.
But this normal function launches a new co-routine and performs some action in an async way.
If the function was a suspend function, We could have used a run-blocking way to test it on the test case so the test case does not finish until the suspend function finishes the execution.
This is more common where a view calls a function in a view-model and the view-model launches a co-routine.
Since the launched co-routine is independent we will not be able to use a run-blocking function.