Push notifications are one of the most effective ways to retain users, but a broken notification experience can lead to immediate uninstalls. Whether your app fails to request the correct permissions, or your background service crashes when a message is received, poorly tested push notifications will destroy your app's retention rate.
In this developer's guide, we'll walk through the essential steps and best practices for testing push notifications in Android, specifically focusing on Firebase Cloud Messaging (FCM).
1. The Quickest Method: Firebase Console
If you are just starting your integration, the fastest way to verify that your app can receive messages is by using the built-in Notifications Composer in the Firebase Console.
According to the official Firebase documentation, you can send a test message directly to a specific device.
How to send a test message:
- Ensure your app retrieves its unique FCM registration token on startup. Log this token to your Android Studio console.
- Go to the Messaging section in your Firebase Console.
- Click New campaign > Notifications.
- Draft your message, click Send test message, and paste your device's FCM registration token.
If your device receives the notification, your basic integration is working!
2. Testing App States: Foreground vs. Background
A common trap for developers is only testing notifications while the app is open. FCM handles messages differently depending on the app's state.
- Foreground: If your app is open, FCM delivers the message directly to your
FirebaseMessagingService.onMessageReceived()method. You are responsible for manually building and displaying the notification using theNotificationCompat.Builder. - Background: If your app is closed or in the background, the Android system automatically displays the notification in the system tray on behalf of your app. Your app code is only triggered when the user taps the notification.
You must test both scenarios. Send a test payload, put your app in the background, and verify that the system tray displays the notification correctly. Then, open your app and send another payload to ensure your onMessageReceived logic doesn't crash.
3. Verifying Android 13 (API 33) Permissions
Starting with Android 13, apps must explicitly request the POST_NOTIFICATIONS permission from the user at runtime.
If you fail to request this permission—or if you request it at a confusing time and the user denies it—your app will silently fail to display notifications.
Testing Checklist for Permissions:
- Does the permission dialog appear at the right time in the user journey?
- If the user selects "Don't allow," does the app gracefully handle the denial without crashing?
- If the user later enables notifications in the system settings, does the app correctly recognize the change?
4. Why You Need Real Testers for Notifications
Automated tests and the Firebase console are great for initial development, but they cannot replicate the chaos of real-world usage.
How does your app behave when a notification arrives while the device is in "Doze mode"? What happens if the user taps a deep link inside the notification while they have a poor network connection?
To confidently launch your app, you need real human testers using real devices in everyday scenarios. This is critical for passing the Google Play 14-day testing requirement.
Instead of relying on friends who might ignore your notifications, consider using 12-App Tester. We provide a team of professional Android testers who will actively engage with your app for 14 continuous days.
Our testers can verify that your push notifications arrive on time, display correctly across different device brands, and deep-link to the correct screens. Catch these issues early, avoid common Google Play policy violations, and ensure a flawless launch.
Ready to stress-test your push notifications? Start your QA campaign with 12-App Tester today!