Testing Store Purchasing
Testing in-app subscriptions on both Android and iOS platforms involves several steps to ensure that your subscription-based features work as intended. Here's a general guide for testing in-app subscriptions on both platforms:
1. Set up a Testing Environment:
Android: You can test in-app subscriptions on Android using the Google Play Console. Ensure you have a Google Play Developer account.
iOS: For iOS, you'll need access to an Apple Developer account. You can test in-app purchases on iOS using the Xcode simulator or on physical devices.
2. Create Subscription Products:
Android: In the Google Play Console, create subscription products for your app. Make sure to set up the pricing and durations according to your requirements.
iOS: In App Store Connect, create subscription products that match what you intend to offer to users.
3. Test on Android:
On an Android device, install the app using the testing track in Google Play Console, if necessary. Use test accounts to make subscription purchases. Google provides a set of test card numbers to simulate purchases. Verify that your app correctly handles subscription purchase, renewal, cancellation, and expiration.
4.Test on iOS:
Install your app on an iOS device or simulator. Use sandbox testing accounts provided by Apple for subscription testing. Ensure that your app uses the sandbox environment for purchases. Verify that your app handles subscription purchasing, renewal, cancellation, and expiration properly.
5. Test Subscription States:
Ensure that your app accurately reflects the user's subscription status, such as whether they are currently subscribed, when their subscription will renew, or if it has been canceled.
6. Test Edge Cases:
Test edge cases like restoring subscriptions on a new device, handling upgrades/downgrades of subscriptions, and verifying that users cannot access premium content without a valid subscription.
Bolt Android:
Use Test Accounts:
On your Android device or emulator, ensure you are logged in with a Google account.
In the Google Play Console, add test accounts under "Settings" > "Account details" > "License testing."
Install the App:
Install your app on the test device or emulator.
Test Subscription Purchases:
Open your app and navigate to the subscription purchase screen.
Select a subscription product and proceed with the purchase using a test account.
Confirm that the purchase flow works correctly. You can use test card numbers provided by Google Play to simulate purchases. These test purchases won't result in actual charges.
Verify Subscription Status:
After a successful purchase, verify that the app correctly reflects the user's subscription status. Check if the subscription is active, and display renewal dates if applicable.
Testing Renewals:
If your subscription is set to renew automatically, wait for the renewal date to see if the renewal process works as expected. Ensure that the subscription's renewal date is correctly updated in your app.
Testing Cancellations:
Test subscription cancellations by canceling a subscription through the Google Play Store. Verify that your app appropriately handles canceled subscriptions, and the user loses access to premium content.
Testing on Multiple Devices:Test your app on different Android devices and Android versions to ensure compatibility.
Testing on Emulators:
Use different Android emulators with varying configurations to verify your app's functionality across different device profiles.
Error Handling:
Test your app's error-handling mechanisms by intentionally causing errors during purchases, such as using invalid test card numbers.
Subscription States:
Verify that the app accurately reflects the subscription states, such as active, expired, or canceled, based on the test scenarios.
Logging and Analytics:
Ensure that you have robust logging and analytics in place to monitor and track subscription-related events and issues during testing.
Test on Real Devices:
Whenever possible, conduct testing on real Android devices in addition to emulators.
Monitor Server-Side Validation:
Continuously monitor server-side receipt validation to ensure that no unauthorised access to premium content occurs.
Bolt iOS:
Testing in-app subscriptions on iOS using TestFlight is a great way to ensure that your subscription functionality works as expected before releasing your app to the App Store. Here are the steps to set up and test in-app subscriptions using TestFlight for an iOS app: In App Store Connect, navigate to "TestFlight" and invite internal testers or external testers using their email addresses. Make sure these testers have accepted the invitation.
Configure Sandbox Testers: Before testers can access in-app subscriptions, ensure that they are using sandbox tester accounts. These accounts are created within App Store Connect. Here's how to set up sandbox testers:
In App Store Connect, go to "Users and Access."
Under "Sandbox Testers," click the "+" button to add new testers.
Assign these testers to your app.
Testers can install the TestFlight app from the App Store and use it to install and test your app with in-app subscriptions.
Subscription Purchase and Testing: Testers can initiate subscription purchases within your app using their sandbox tester accounts. Verify that the purchase process works as expected, including upgrading, downgrading, and canceling subscriptions. Confirm that the subscription status is correctly reflected in your app.
Verify Receipt Validation: Ensure that your server-side receipt validation process is correctly implemented and that subscriptions are verified.
Bolt Amazon:
Install the Amazon App Tester: Download and install the "Amazon App Tester" app on your test device. This app allows you to test in-app purchases, including subscriptions.
Configure Your Test Device: On your test device (e.g., a Fire tablet), make sure you're signed in with the same Amazon account associated with your developer account.
Install Your App: Sideload your app onto the test device. Amazon Fire devices generally support side loading by enabling "Apps from Unknown Sources" in the device settings.
Enable Testing Mode: Open the Amazon App Tester on your device.
In the App Tester app, go to "Settings" and enable “Testing Mode.”
Initiate Subscription Purchases: Open your app on the test device > Navigate to the subscription purchase screen > Choose a subscription product and initiate a purchase.
Test Subscription Functionality: Verify that the purchase process works as expected, including selecting a subscription, completing payment, and receiving a confirmation. Test subscription renewal if it's an auto-renewable subscription. Verify that the subscription status is correctly reflected within your app (e.g., showing an active subscription).
Check for Testing Responses: Monitor the responses and error messages provided by the Amazon App Tester to identify and address any issues during testing.
Testing Edge Cases:Test edge cases, such as upgrading or downgrading subscriptions, and verify that users cannot access premium content without a valid subscription.
Test on Different Amazon Devices: If possible, test your app on various Amazon devices to ensure compatibility. By following these steps, you can thoroughly test in-app subscriptions on Amazon devices using the Amazon App Tester and verify that your subscription features are working correctly before releasing your app to users.
Testing Amazon subscriptions via "Live App Testing" involves evaluating the functionality and user experience of subscription-based features within your app using a selected group of testers. Here's a brief summary of the process:
- Create a Test Group: Define a group of testers who will participate in the subscription testing phase. Invite them using their email addresses.
- Prepare the App: Ensure that your app is updated to include subscription functionality, such as purchase flows, subscription management, and access control.
- Upload the App for Live App Testing: Submit your app to the Amazon Appstore, designating it as a "Live App Test." This version of your app will be accessible only to the invited testers.
- Testers Install the App: Testers receive an email invitation to join the test group and install the app on their Amazon devices.
- Test Subscription Features: Testers can subscribe to your app's offerings, whether they are monthly, annual, or other subscription plans. They should evaluate the purchase process, renewal, cancellation, and access to premium content.