MagicPod currently does not support E2E testing of in-app purchases (IAP) in mobile applications.
This is due to platform restrictions enforced by Apple and Google, which prevent automated tools from completing purchase transactions.
Table of Contents
Unsupported Features
-
In-app purchases made via the App Store or Google Play Store cannot be automated using E2E testing tools.
-
You can test up to the point of displaying the purchase UI and tapping purchase buttons, but the actual purchase transaction cannot be completed or verified automatically.
Workarounds
If you need to test flows that depend on a successful purchase, consider the following alternatives:
-
Use server-side mocks or stubs
Simulate the purchase completion by configuring your backend to return a successful purchase state for designated test users.
This allows your app to behave as if the user has made a purchase. -
Add a test mode to your app
Implement a development or QA build mode that bypasses the actual IAP flow and mimics a successful purchase.
For example, you could add a hidden toggle in the settings screen that marks the user as "purchased". -
Combine with manual testing
Use Apple's or Google's sandbox testing environments and test accounts to verify actual payment flows manually.
You can then automate the surrounding UI flows and logic that don’t rely on the real purchase result.
Future Support
Due to current platform restrictions, full automation of the billing process in mobile apps is not possible.
We will monitor any changes to Apple’s or Google’s APIs and consider supporting automated IAP testing in the future.
Frequently Asked Questions
Q. Can I test tapping the purchase button?
A. Yes. You can verify that the purchase button is displayed and can be tapped.
However, you cannot confirm whether the transaction was successfully completed via automation.
Q. Can I test subscription renewal or cancellation automatically?
A. No. Subscription renewals, cancellations, and refund flows are controlled by Apple and Google, and cannot be triggered or verified via E2E automation. These flows must be tested manually using sandbox test accounts.
Q. Can I automate the post-purchase experience (e.g., showing premium content)?
A. Yes. By mocking the purchase state (e.g., marking the user as "premium"), you can automate and test the behavior of your app after a successful purchase.