Test Interface Actions
The Test Interface Actions endpoint is called by Test Suite 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 features that it implements.
Descriptions for each action can be found in the Test Interface doc.
Which Actions to implement?
Use Test Data Generator to find out which Test Interface actions your booking system needs to implement. Follow these steps:
In your Test Suite instance, which you configured in the previous step, 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 Test Data Generator README.
Test Interface Action Implementation Guidelines
1. Switch Statement
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):
2. Test Interface Actions must use same code pathways as real-life counterparts
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.
Last updated