AirtestProject / Poco

A cross-engine test automation framework based on UI inspection
http://airtest.netease.com/
Apache License 2.0
1.77k stars 318 forks source link

my-testflow中总是提示 raise RuntimeError("start recording error") #26

Closed bs111 closed 6 years ago

bs111 commented 6 years ago
05:17:42][DEBUG]<airtest.core.android.adb> D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 3bba3962 shell CLASSPATH=/data/app/com.netease.nie.yosemite--bPpUoxtbUl1v7ix5sXJhA==/base.apk exec app_process -Dduration=1800 /system/bin com.netease.nie.yosemite.Recorder --start-record
[05:17:43][DEBUG]<airtest.utils.nbsp> [328019016]'browsing http://10.66.206.25:8686/start<?filename=xxx.mp4> to start recording!'
[05:17:43][DEBUG]<airtest.utils.nbsp> [328019016]'then using http://10.66.206.25:8686/download to stop and download recording.'
[05:17:43][DEBUG]<airtest.utils.nbsp> [328019016]'or using http://10.66.206.25:8686/stop to stop the recording server.'
[05:17:44][DEBUG]<airtest.utils.nbsp> [328019016]'[socket][0] connection /127.0.0.1:8686;LocalPort=-1(0)'
[05:17:44][DEBUG]<airtest.utils.nbsp> [328019016]'[socket][/127.0.0.1:41526] connected'
[05:17:44][DEBUG]<airtest.utils.nbsp> [328019016]'get current display size...'
[05:17:44][DEBUG]<airtest.utils.nbsp> [328019016]'get display size...'
EndOfStream: 328019016
D:\WebSafe\AndroidTest\venv\lib\site-packages\pocounit\case.py:187: UserWarning: Fail to start result emitter: "ScreenRecorder". You can report this error to the developers or just ignore it. Error message: 
"Traceback (most recent call last):
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\pocounit\case.py", line 183, in run
    emitter.start()
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\pocounit\result\record.py", line 39, in start
    self.started[udid] = self.start_device_recorder(udid, dev)
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\pocounit\result\record.py", line 64, in start_device_recorder
    success = device.start_recording()
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\android.py", line 506, in start_recording
    return self.recorder.start_recording(*args, **kwargs)
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\utils\snippet.py", line 101, in ready_func
    return func(inst, *args, **kwargs)
  File "D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\recorder.py", line 53, in start_recording
    raise RuntimeError("start recording error")
RuntimeError: start recording error
"
  .format(emitter.__class__.__name__, traceback.format_exc()))
---------------,进入文本翻译,设置好翻译的原来的语言为中文
[05:17:55][DEBUG]<airtest.utils.logwraper> >sleep Time used: 2.007000s
[05:17:55][DEBUG]<airtest.utils.logwraper> function: {'time_used': 2.006999969482422, 'args': (2,), 'name': 'sleep', 'ret': None, 'kwargs': {}}
.[05:17:55][DEBUG]<airtest.core.android.adb> D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 3bba3962 shell am force-stop com.ape.translator
exiting.......
[05:17:56][DEBUG]<airtest.utils.logwraper> >stop_app Time used: 0.210000s
[05:17:56][DEBUG]<airtest.utils.logwraper> function: {'time_used': 0.21000003814697266, 'args': ('com.ape.translator',), 'name': 'stop_app', 'ret': None, 'kwargs': {}}

----------------------------------------------------------------------
Ran 1 test in 29.081s

OK
[05:17:56][DEBUG]<airtest.core.android.adb> D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 3bba3962 forward --remove tcp:11649
[05:17:56][DEBUG]<airtest.core.android.adb> D:\WebSafe\AndroidTest\venv\lib\site-packages\airtest\core\android\static\adb\windows\adb.exe -s 3bba3962 forward --remove tcp:18398

Process finished with exit code 0

测试环境: android 8.1系统 测试原生apk win10 home basic版本。

adolli commented 6 years ago

是你手机不支持录屏,可以忽略此报错