Integration test example

We will look at a public API, such as CircleCI, and write an integration test that hits the API endpoint and verifies that the status code and the body of the request are what we would expect. This would typically be a local API that you are working on and want verification of correct behavior but, as an example, we will hit the CircleCI for illustration purposes only. We will create a new repository in GitHub using our packtci user and call it integration-test-example (https://github.com/packtci/integration-test-example). We will use several libraries including supertest (https://github.com/visionmedia/supertest),  a Node.js library, baloo (https://github.com/h2non/baloo), a Golang library to hit API endpoints, and ...

Get Hands-On Continuous Integration and Delivery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.