Test Interface Actions
Last updated
Last updated
The is called by to simulate different actions in your booking system e.g. "Seller-requested cancellation".
Your booking system only need to implement those actions which relate to that it implements.
Descriptions for each action can be found in the .
Use to find out which Test Interface actions your booking system needs to implement. Follow these steps:
In your Test Suite instance, , run:
The logs from this script will point to two files that it generated, called:
opportunity-test-data.json
test-interface-actions.json
The test-interface-actions.json
file will contain a list of Test Interface actions that you need to implement for the features that your booking system supports. To see an example of what this looks like, see the .
Use something like a switch
statement for your actions endpoint.
For example, if your booking system only needs to support the test:SellerRequestedCancellationSimulateAction
and test:CustomerNoticeSimulateAction
actions, your route would look like (using Node.js with Express as an example):
As an example, when implementing the test:SellerRequestedCancellationSimulateAction
Test Interface action, the test logic should use, as much as possible, the same code pathways as are called when an administrator cancels an activity in the real system. The goal is to replicate real-world processes accurately, rather than simply employing quick fixes to meet Test Suite expectations.
Here is a very simplified example of the correct way to do this (using Node.js with Express):
This approach is key to ensuring that Test Suite accurately verifies all of the booking system's behaviours that will occur in real-life operation.