Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
791 views
in Technique[技术] by (71.8m points)

running appium against an already booted emulator

I have got my appium tests running, however I am suffering about 50% test failures because of the amount of time it takes the app to install so appium is failing the tests.

Is there a way of getting appium to run against an already running device emulator which has the app installed and running or does it have to load the app itself every time?

question from:https://stackoverflow.com/questions/65843580/running-appium-against-an-already-booted-emulator

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can definitely connect to the running emulator, you need to pass udidas capability. It works both for Android and iOS.

For Android use adb devices to get the value, for iOS - instruments -s devices. But if you connect only 1 device/emulator, you can ignore it.

To save installation time aka install only once, you can check reset strategies and find what works for you:

e.g. for Android adding capability noReset: true will leave app as is on device after session is closed. When you start the 2nd Appium session, it will skip cleanup and simply open the app. Note: app cache won't be cleaned and may affect the test.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...