- To test a serverless app, use the latest version of Chrome.
- As testing is only a simulation of events, actual data or record associated with the event is not created in the back-end. To create actual data and then test your event, publish your app as a custom app and test the events manually.
- Ensure that the JSON files that contain the sample payloads to test events, are available at <app's root directory>/server/test_data.
To simulate an event and test your app:
From the command line, navigate to the directory that contains the app related files and run the following command.
fdk run
In the address bar of the browser, enter https://localhost:10001/web/test. A dialog box is displayed.
Click Select an event. The list of all events configured in the server.js file is displayed.
Note:To test a product event, select the corresponding product event’s name.
Select an event. The corresponding payload is displayed. To test a different scenario other than the default, edit the payload.
Click Simulate. If the event is successfully simulated, the Simulate button changes to a Success button. If the event simulation fails because of invalid payload data, the Simulate button changes to a Failed button. Modify the payload appropriately and click Simulate.