Instruction for iMock
#Before you start
Before using iTest, go to Alipay Developers Center, enter the Integration Settings section, and configure your settings for the sandbox environment.
- Click Sandbox tab and click Edit public key.
- Enter your public key and click Submit.
If you do not have one, you can download the tool for generating RSA2 keys and use it to generate your keys.
- Enter your notification URL. The notification URL is used for receiving notifications.
iMock provides simulations of different API results and returns the specified response for integration testing.
iMock can simulate all the result codes, including production environment scenarios that are rare but not entirely impossible. This helps developers to work with the same corresponding system logic processing in sandbox. The effective time of the mock results can be changed by adjusting the mock time.
All types of responses are designed by Alipay for indicating different result codes. No response is specified by default. If you specify the response, this type of response for the corresponding API is always returned when iMock is turned on.
API Mock will be turned off automatically when the time is up. The duration can be set as 30mins, 60mins, 90mins or 120mins. The user can set the time for automatic shutdown manually.
To start using the iMock tool for simulations of different API results, go to Alipay Developers Center, create an application, and then locate iMock under Development Tools.