संपादित करें

इसके माध्यम से साझा किया गया


Device sleep during testing

Important

Visual Studio App Center is scheduled for retirement on March 31, 2025. While you can continue to use Visual Studio App Center until it is fully retired, there are several recommended alternatives that you may consider migrating to.

Learn more about support timelines and alternatives.

In App Center Test, devices automatically sleep if they don't receive a user interaction periodically. Long pauses between user interactions can cause test failures when devices go to sleep.

Android devices sleep after no interaction for 10 minutes. iOS devices sleep after no interaction for 5 minutes. App Center Test uses these limits because they're usually the maximum sleep limits available on each platform, without having devices stay on indefinitely. Indefinite operations can cause other problems in the device cloud.

If your testing scenario requires delays that exceed the device sleep time limits, try the following options:

  • Add one or more user interaction gestures during the wait to prevent the device from sleeping.
  • Mock or simulate the wait, instead of waiting for it to complete normally.