Drizz raises $2.7M in seed funding •
Featured on Forbes
Drizz raises $2.7M in seed funding •
Featured on Forbes
Logo
Blog page
>
Battery Testing for Mobile Apps: What QA Teams Miss

Battery Testing for Mobile Apps: What QA Teams Miss

Battery testing for mobile apps. Real device requirements, wake lock categories, Low Power Mode gaps, and what most QA teams skip.
Author:
Partha Sarathi Mohanty
Posted on:
July 3, 2026
Read time:

Key takeaways

  • Battery testing for mobile apps has to happen on real devices. Simulators underestimate drain by 30 to 50%, so any test run on an emulator is lying to you.
  • Most teams test drain during active foreground use. The real bugs live in idle drain: background sync loops, wake locks that never release, GPS polling that runs while app is closed.
  • Low Power Mode on iOS and Battery Saver on Android change app behavior. If you're not testing under both modes, your app has behavior you've never validated.

Battery testing for mobile apps is practice of measuring how much power your app consumes on real devices under real usage patterns. Not just during a checkout flow. Not just for 10 minutes. Also idle drain, background drain, wake lock hold times, network transitions, and drain profile when OS puts your app into a restricted state.

Most QA teams do a version of this and think they're covered. They aren't. Battery testing is a performance dimension most teams treat as an afterthought, and visible bugs (a drain during video playback) are ones they catch. The hidden ones (an app that sips 4% per hour while phone is in your pocket) are ones that get uninstalled.

Here's what actually gets missed and how to fix it.

Why emulators lie about battery

Emulators run on your Mac or Linux CI machine's power. They report a fake battery. The fake battery drops based on rough estimates of what emulated hardware would draw. Those estimates are wrong by 30 to 50% versus real devices.

Reasons gap is that big:

  • No cellular radio. Emulators don't have modem that real devices use to talk to towers. Cellular is one of top three battery draws.
  • No GPS chip. Simulated location uses zero hardware. Real GPS burns power constantly when active.
  • No screen. Emulators render to a window on your desktop. Real OLED panels have per-pixel power draw that varies with content brightness.
  • No thermal reality. Real devices throttle when hot. Emulators don't. Your test on emulator finishes in 3 minutes. On a real device with a hot CPU, same test takes 5, and thermal throttling changes what your app does.

According to Pcloudy's battery drain testing guide, simulator drain readings can be off by half. That means anything you validated on an emulator is untested from a battery perspective.

Run battery tests on physical devices. Doesn't matter which cloud farm, doesn't matter which brand. Real hardware only.

Three patterns of drain that need different tests

Most posts treat "drain" as one thing. It isn't. Three patterns.

Sip drain. Slow steady loss over hours. 3 to 5% per hour while app appears idle. Usually a background sync loop that fires too often, or a wake lock held by a service that shouldn't be running. Soak runs are where battery testing findings usually surface for this pattern, since drain shows up over time.

Guzzle drain. Fast loss during active use. 15% in an hour of video playback. This is visible one. Users notice. Teams test it. Fix it or accept it.

Spike drain. Sudden burst of consumption. 2% in 30 seconds during a specific action. Payment authorization, image upload, session refresh. Compounded across a day, becomes noticeable.

Each pattern has a different test setup. Sip needs a long run in background (an hour minimum, ideally overnight). Guzzle needs an active session with instrumentation. Spike needs a specific action repeated with fresh measurements each time.

Skip any of three and you're missing a category of bugs. Monitoring can catch battery regressions in production, but battery testing catches them before release, where fixes are cheaper.

What QA teams actually miss

Six specific gaps that show up across teams.

Idle drain testing. Everyone tests during active use. Very few teams background app and let it sit for an hour with metrics running. This is where wake locks that never release, JobScheduler tasks that fire too often, and location polling that shouldn't be happening show up. If your app drains 4% per hour while backgrounded, that's a bug and a bad review waiting.

Low Power Mode testing. iOS Low Power Mode kicks in at 20% battery. It changes behavior automatically. Background app refresh disables. Mail fetch pauses. Some visual effects turn off. Does your app know it's in Low Power Mode? Does it degrade gracefully? Or does it look broken because your assumed-on features are silently off?

Android's Battery Saver is worse for consistency because every OEM implements it differently. Samsung's Ultra Power Saving Mode is aggressive. Xiaomi's MIUI has its own quirks. Test on OEMs where your users actually are, not just Pixel.

Wake lock categories. Most posts say "watch for wake locks" and stop. The actual bug is what kind. PARTIAL_WAKE_LOCK keeps CPU on with screen off. PROXIMITY_SCREEN_OFF_WAKE_LOCK is for calls. WiFi wake locks. GPS wake locks. Each has its own release rules. A PARTIAL_WAKE_LOCK held for 6 hours because a Java exception skipped release() call is classic Android battery bug. adb shell dumpsys battery tells you count. adb shell dumpsys power shows actual locks held.

Charging state transitions. Behavior differs when plugged in vs on battery. Some apps behave correctly on charge (they preload aggressively, expecting power) and terribly off charge (they keep preloading, drain battery). Test both states.

Session and network handoffs. Wi-Fi to 4G handoff mid-request. That request retries. The retry uses cellular power. If app doesn't know it happened, it might trigger three retries and burn power for no gain.

Multi-window and foldable modes. Split-screen on Android tablets. Stage Manager on iPad. Foldable transitions. Each triggers layout changes and lifecycle events that can wake background services incorrectly. Rare in raw usage, but drain multiplies when it happens.

How to do battery testing without a lab

You don't need a $10,000 Monsoon power monitor to do useful battery testing. What you need is a consistent methodology.

Baseline first. Full charge, factory-reset device with only your app installed. Note starting battery %. Run a specific scenario for a fixed time. Note ending %. Repeat 3 times. Average.

Android instrumentation:

# Battery stats reset (Android)
adb shell dumpsys batterystats --reset

# Run your app scenario here...

# Get the current battery stats
adb shell dumpsys batterystats > battery_stats.txt

# For a specific package
adb shell dumpsys batterystats --charged com.your.app

iOS instrumentation:

Xcode's Energy Log instrument. Attach to a physical device (required, no Simulator support). Run scenario. Export log. Compare across builds.

Newer approach: xcrun devicectl gives programmatic access to some energy metrics on iOS 17+.

In-CI approach. Both platforms let you scrape battery level via adb or iOS equivalent between test steps. Set a threshold: if your standardized 30-minute test scenario drains more than X% on a baseline device, build fails.

The soak testing overlap

Battery bugs that only surface after an hour of use aren't going to show up in a 5-minute smoke test. This is where soak testing and battery testing overlap. Wake lock leaks that never fire in a short run become obvious in an overnight one.

A workable soak-and-battery combined test: 8-hour overnight run of a specific scenario on a real device, with instrumentation capturing battery level every 5 minutes. In morning, plot drain over time. Straight line means healthy. Steps mean a wake lock fires periodically. Sudden drops mean something's spinning.

Where automated battery testing fails

Battery testing needs long runs. Long runs need reliable tests. Selector-based frameworks (Appium, XCUITest, Espresso) struggle here for one specific reason.

Long-running tests flake more than short ones. If your baseline scenario is a 30-minute active session, and your test has a 5% chance of flaking on any given step, your 30-minute run has close to a 100% chance of failing somewhere. You can't measure drain across a scenario that didn't complete successfully.

Teams work around this by either shortening scenario (loses signal on wake lock issues that need time to manifest) or by manually running test (doesn't scale beyond one QA engineer's device at a time).

Neither is a good option.

What works for battery testing at scale

We built Drizz partly for this shape of problem. Vision AI reads screen instead of locators. When "Continue" button is at pixel 200 on one device and pixel 240 on another, Drizz finds it both times because it's looking at what it says, not where it is.

For battery testing this matters because you need to run same scenario across same devices reliably enough to measure drain differences between builds. If test doesn't complete on both builds, you have no measurement.

Concrete workflow.

Before, on Appium: 30-minute battery test scenario. Run 1 succeeds. Run 2 fails on step 47 because a selector changed after a UI update. QA lead retries. Run 3 succeeds. Now you're comparing Run 1 to Run 3 across a build boundary, which contaminates drain comparison. Test loses value.

After, on Drizz: Same 30-minute scenario. Vision AI walks through every screen. The UI update doesn't break test because button label is still "Continue." Both runs complete. Drain comparison is valid. You catch build that added 800 mAh of extra consumption because of a new background service.

The battery testing itself is still profiler's job. What Drizz contributes is reliable driver so profiler is measuring meaningful runs.

For teams running battery regression as part of CI/CD, this is difference between "we have battery tests" and "our battery tests actually run to completion."

FAQ

What is battery testing for mobile apps?

Measuring how much power your app draws on real devices during active, idle, and background use.

Can battery testing be done on emulators?

No. Emulators underestimate drain by 30 to 50% because they lack cellular radios, GPS, and real screens.

What causes most battery drain in mobile apps?

Background services and wake locks that don't release, excessive GPS polling, and overly aggressive sync loops during idle.

How often should we run battery testing?

Critical scenarios per release. Idle drain and Low Power Mode tests nightly as part of regression, not per PR.

What tools do you use for battery testing?

Xcode Instruments Energy Log on iOS. Android Studio Energy Profiler and adb dumpsys batterystats for Android.

How do you test Low Power Mode behavior?

Toggle Low Power Mode manually or via automation, or drop battery below 20% to trigger it automatically.

About the Author:

Partha Sarathi Mohanty
Co-founder & CPO, Drizz
ISB-trained product leader with battle scars from Mensa, Zolo, BlackBuck, and Shadowfax, now turning AI-native testing into an actual roadmap.
Schedule a demo