Error scenario simulation
Error scenario simulation provides simulations of different API results and returns the specified response for integration testing.
Before you begin
Before conducting the error scenario simulation, log in to Antom Dashboard, enter the Key configuration page, and configure the settings for the sandbox environment.
- Go to Developer > Key Configuration, click Generate key. Or go to Developer > Quick start, find Integration resources and tools, select Integration resources, and click Generate key.
- Click Confirm. The keys are generated.
Note: Your private key is only displayed once and Antom does not store it. Make sure you save your private key for later use.
- If you decide to replace the keys, you can replace API keys with one click or by using tools. Go to Developer > Key configuration, click Replace keys. Or go to Developer > Quick start, find Integration resources and tools, select Integration resources, and click Replace keys.
Note: To replace keys, use one of the following methods:
- Click Replace keys with one click to replace the old keys with the keys generated by Antom.
- Click Use your own public and private keys to generate your own public and private keys by using the tool provided on the page.
- Go to Developer > Notification URL. Select the Configuration tab. Click Add under Action and enter your notification receiving address under Notification URL.
Simulate errors
Error scenario simulation can simulate all result codes, including rare production environment scenarios. This helps developers to work with the same corresponding system logic processing in the test mode. The effective time of the results can be changed by adjusting the simulation time.
Antom provides a variety of responses corresponding to different result codes. Select a specifc result code for the system to simulate the corresponding response of the API.
API simulation duration
Once you set a specific time duration (30 min, 60 min, 90 min, or 120 min) for API simulation duration, the simulation of API calls with the specified error scenario will automatically conclude when the set duration expires.
After you specify a response, the specified response is always returned for the corresponding API when the API simulation is turned on. For details about API simulation process, see API simulation.