Question

Feature request: Mock at server level

  • 7 March 2023
  • 1 reply
  • 59 views

Badge +3

Hello,

 

End-to-end testing of IAP is painful.

 

On iOS, I can’t do Storekit testing on simulator without running through Xcode (how to implement in headless ci?). Also I can’t do Storekit testing on a release archive. I don’t have the budget to run on real devices.

 

On Android, it kind of works, but is especially painful because automating the purchase UI is not trivial and flaky.

 

While I could mock at my app level (i.e. at JS level in my case), I don’t get any guarantee that the purchases will work in the real world. I already had so many issues with purchases working here and not there, that’s why I’m now using RC. I don’t want to have responsibility over this part of the code.

 

It would be very convenient to be able to set a different API key in Purchases.configure() and then all the purchases would success without going through real App store / Play store stuff. Different API keys could also be created with different expected behaviours such as “Always approve” or “Always declines”. Those purchases would appear as “Sandbox” in the Dashboard.

 

For now I still don’t know how I should reliably do e2e testing on my subscriptions. Comments are welcome !


1 reply

Userlevel 6
Badge +8

Hey @Arthur!

Thanks for the great feedback here, we definitely want to do anything we can to make this process easier. There are limitations from individual platforms, but in general we want to make in-app purchases as easy as we can.

I’ll share this with the team, and I’ll leave the thread open so anyone else that wants to chime in is able to!

Reply