小编jmc*_*ker的帖子

在带有-no-window的模拟器中运行时,测试工具进程崩溃

在正常的带窗口的Linux Android仿真器上运行时,我们的Android Espresso UI测试能够通过,但是在带有-no-window -no-audio标志的情况下运行时,测试会失败。我们已经拉出了Test Orchestrator文件和Logcat信息,但是似乎找不到问题的根源。

现在,我们有两个UI测试,它们实际上什么都不做。删除第二个将通过测试。

两者都可以像在Windows上使用Android仿真器(同时使用和不使用-no-window -no-audio)一样正常工作。

系统规格

  • Ubuntu服务器-16.04.4
  • SDK工具-26.1.1
  • 生成工具-27.0.3
  • Android模拟器-27.2.9
  • Android图片-android-27 x86

资源

日志

/data/data/......./SettingsActivityTest#useAppContext.txt

onError: commandError=true message=null
android.os.DeadObjectException
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(Binder.java:764)
    at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:5061)
    at com.android.commands.am.Instrument.run(Instrument.java:419)
    at com.android.commands.am.Am.runInstrument(Am.java:187)
    at com.android.commands.am.Am.onRun(Am.java:80)
    at com.android.internal.os.BaseCommand.run(BaseCommand.java:54)
    at com.android.commands.am.Am.main(Am.java:50)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:285)
Run Code Online (Sandbox Code Playgroud)

Logcat输出(我们认为问题出在哪里的摘录)

--------- beginning of crash
05-25 02:13:02.182  1629  2688 F libc    : Fatal signal 11 (SIGSEGV), code 2, fault addr 0xc9d86050 in tid 2688 (RenderThread), pid 1629 (system_server)
05-25 …
Run Code Online (Sandbox Code Playgroud)

android qemu android-emulator android-logcat android-espresso

5
推荐指数
1
解决办法
558
查看次数