Testing of API specs - Integration Testing
Closed this issue · 3 comments
Two things:
- Testing
- API Specs
I have been looking at API Blueprint and OpenAPI for standards to document the API spec.
I then tried to use dredd to read the API spec and test it automatically in some way, however dredd does not support nodejs 10.
We have some unit tests for the internal modules, but it would be good to perform integration testing on the back-end stack. At least Testing client <-> Docks API <-> Database
. Perhaps a basic test to see if Docker is reachable.
Any suggesting on testing frameworks for API? I found hippie and hippie-swagger which might do what we want.
My thinking for the integrations testing is as follows:
- Travis runs unit tests
- Docker cloud builds images and triggers a Travis build using a webhook (is this possible?)
- Travis pulls the images and runs the integration testing suite
Each commit will then be unit tested, and integration tested.
For the front-end the docks api stack will be included in the integration test.
TODO:
- Research if it is possible to trigger a travis build using a webhook, running a different .travis file
frisby also looks like a good tool for testing. It uses Jasmine style syntax.
Does not seem to be possible to have Travis pull images after Docker Cloud is done. We will have to move image building to Travis if we want to perform integration testing using the Docker images.
Looking at API Blueprint for writing API specs and aglio for producing nice HTML from the specs, similar to Docker.