DEV Community

Testers HUB
Testers HUB

Posted on Originally published at Medium

Push Notification Testing for Mobile Apps: 12 Checks Before Release

A push notification can fail in four places: the app, your server, the push service, and the phone's own settings. Testing only the screen the user sees covers one of them.

The path of a notification

When a user allows notifications, the app asks the operating system for a device token. On iPhone, it comes from Apple's push service, and on Android from Firebase Cloud Messaging. The app sends the token to your server and links it to the user's account. Later, your server sends a message to Apple or Google, which delivers it to the phone, and the operating system decides whether and how to show it.

12 checks

Permission and delivery

  1. First-run prompt: Android 13+ and iOS ask at runtime. The iOS system prompt can only be shown once, so check when your app asks.
  2. Denied, then allowed later: enable notifications from Settings and confirm delivery works without a reinstall.
  3. Revoked while logged in: switch notifications off mid-session and look for crashes and stale tokens the server keeps using.
  4. Timing and duplicates: if a token is registered more than once, one user can receive duplicates.

App state and taps

  1. Foreground, background and killed: test the same payload in all three states on both platforms.
  2. Tap opens the right screen: test deep links with the app closed, the user logged out, and the content deleted.
  3. Badge counts: they should drop when an item is read on another device.
  4. Stacking and cleanup: related notifications should group, and resolved ones should be removed.

Content, privacy and devices

  1. Lock screen text: long names, emojis and non-English characters, and no sensitive data while locked.
  2. Language and time zone: the server may still hold old settings after a user changes either.
  3. Account switching: after logout, the previous user's notifications must stop. Check that the old token is unregistered.
  4. Device and OS coverage: Android manufacturers apply their own battery rules, and iOS Focus modes and low power mode change delivery.

A small test kit

  • Two Android phones from different brands and two iPhones on different OS versions
  • Two test accounts
  • A way to send notifications on demand with short text, long text, an image and a deep link
  • A log of device, OS version, app build, send time and receive time

The send and receive times tell you whether a delay came from your server, the push service or the phone.

Release blockers

Block the release for notifications reaching the wrong user, sensitive data on the lock screen, crashes on tap, and missing notifications in key flows such as order confirmations or login codes. Wrong badge counts and secondary-device duplicates can usually wait until after launch.

We test Android and iOS apps on real devices at Testers HUB. More about our mobile app testing services.

Top comments (0)