Configuring Test Suite
Last updated
Last updated
Clone the test suite repository locally, and install its dependencies.
version 14 or above is required ().
You can check that the test suite works in your local environment by running it against the hosted , simply by using the default configuration:
Note that the above command only runs the "core" tests within the test suite, which should take around 60 seconds to complete.
Copy the file ./config/default.json
to ./config/dev.json
and configure it to point to the local development environment of your own booking system using the steps on the rest of this page.
Set the environment variable NODE_ENV
to dev
to instruct the test suite to use dev.json
file to override each of the values in default.json
:
The Open Booking API includes two flows:
Before you start your implementation, it is good to configure your config file to match your aspirations. You can then use different test suite commands to run only a subset of the tests during development, and then run npm start
to run all tests.
The test suite will making all bookings under a specific primary
Seller provided in the configuration, using the authentication request headers provided for that Seller.
Configure the broker microservice with the authentication headers required for the Orders Feed.
Adding other ./config/{NODE_ENV}.json
files allows you to override the default configuration. For more information see this .
Assess whether or not your implementation will include either or both of these flows, and configure the test suite accordingly, as detailed in the , for example:
Ensure that your configuration of implementedFeatures
matches the list of features that you have decided upon in . This configuration property is documented in the .
The list of Open Booking API features supported by the test suite can be found in the page.
Note that not all Open Booking API features are currently supported by the test suite. For a list of supported features, please see the page.
Set up the Opportunity Types that your booking system will support, as detailed in the . The test suite will only attempt to book opportunity types that are configured here, for example:
Configure Test Suite to use the testing mode that you have chosen from . You can always start with one and switch to the other later.
For more details, see (Key Decisions).
For more details, see (Key Decisions).
If your booking system only supports a single seller, only the “primary
” seller is required. If your booking system supports multiple sellers, the “secondary
” seller must also be set to support the “” tests.
Your configuration should match your decision in (Key Decisions).
See the for more information.
Your configuration should match your decision in (Key Decisions).
Note such authentication .
The datasetSiteUrl
must be set to the local dataset site URL of your booking system. If you have not yet implemented a dataset site, details for creating it can be found .
In addition to the standard dataset site, the JSON-LD of the page must include the accessService
property, as specified in the . Note that the endpointURL
within the accessService
is most important, and must refer to your local Open Booking API .