简体   繁体   中英

Appium - Reduce loading time between tests

I'm using Appium to create tests for an Android and an iOS app. For execution, I'm using emulators. The tests run as they should, but my problem lays between the tests. The loading time.

I have 42 tests at the moment. To execute them all takes 50 minutes. The main time is taken by the loading time between those tests. Around 45 seconds per test! In other words: 30 of 50 minutes of test execution is taken by the loading time. Only 20 minutes of app usage.

Are there some tricks to make Appium load each test faster?

I've tried already to use the no-reset-strategy, but it only saved me 3 seconds per test.

For the web-based application, we basically used selenium grid to run the test case on multiple PC.but For mobile application, it's difficult to manage.

There have tricks You can use docker mobile emulator so that you can run your test case Parallely.

Here You will get details about usage

https://github.com/butomo1989/docker-android

在此处输入图片说明

There are several tweaks you can try:

  • keep the same driver session for all tests (do not reinstall the app)
  • restart launch activity on Android, to avoid login for each test
  • use deep links to go directly to the screens you wanna test

From my experience mix of these tweaks speedups tests up to 40%

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM