在 Xcode 中,我们使用
self.name
来获取当前执行的 UI 测试用例的类名组合方法名。我想知道在使用 UIAutomator 框架的 Android UI 测试中有什么等价物?
Xcode中PO给的就是这个
(lldb) po self.name
"-[IntegrationTest test_00_02_testMethodName]"
已经尝试过
UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()).currentActivityName
,但它没有给我正确的名字,而且currentActivityName
也被弃用了。