Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
790 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...