Running Test Suite
How to run your now configured Test Suite to check your booking system.
Option 1: Single console window
With your booking system running, execute the following command in the rootopenactive-test-suite
directory:
This will automatically start the microservice, run the integration tests, then kill the microservice. The output from the microservice and integration tests will be combined in the console.
This mode also offers the ability to rerun the tests interactively, for specific flows, which can be useful for debugging. When running in this mode, press "esc" at any time to cancel the currently running test and return to the interactive prompt.
Individual features or tests can be run in isolation using the following commands, for example:
The following shorthand may also be used, as these strings are unique within the path:
Option 2: Two separate console windows
Start the Microservice
With your booking system running, execute the following command:
This will start to harvest the feeds from your running application.
Run the Integration Tests
With both your booking system and openactive-broker-microservice
running, execute the following command, to execute all configured tests:
This will execute tests against your booking system, using the openactive-broker-microservice
as an intermediary.
Individual features or tests can be run in isolation using the following commands, for example:
Reading the test results and debugging
The openactive-integration-tests
writes log files into the ./output/
directory for each test in Markdown format, so you can see the endpoints that have been called, with both the requests sent and responses received.
A reference version of passing test results is also available for comparison, complete with full model requests and responses for each test:
Continuous Integration
For continuous integration environments, "ci": true
must be included in the supplied config JSON to ensure correct console logging output. Then simply run npm start
in the rootopenactive-test-suite
directory. This will automatically start the microservice, run the integration tests, then kill the microservice.
This always overrides the configuration option "waitForHarvestCompletion": true
, to ensure the harvester is up-to-date with the feeds before the tests begin.
Last updated