能否在Android Instrumentation测试中触发进程销毁场景?
Android Instrumentation测试进程重启需求说明
目前通过Google搜索无法找到有效解决方案,Android Instrumentation测试并没有直接实现杀死并重启应用进程这一需求的方法。
以下是测试代码的基础框架:
class TestWithActivity { @get:Rule val composeRule: TestActivityRule = createAndroidComposeRule() @Test fun testStateRestorationAfterProcessDeath(): Unit = with(composeRule) { // 此处需要实现杀死并重启应用进程的逻辑 } }
内容的提问来源于stack exchange,提问作者xxfast
相关产品推荐
相关产品推荐

