We've created a few short, in-browser tutorials using the Katacoda platform to get you up and running quickly depending on your level.
The courses are written in Node and Java, however, extensive experience with the languages will not be required for the workshop.
NOTE: To complete the workshop, you will need to authenticate to Katacoda (the online learning platform) with GitHub, Google, Twitter or LinkedIn.
To complete these tutorials, you must have:
- a Pactflow account (register for a free account at https://pactflow.io/try-for-free)
- a read/write API Token from your Pactflow account
- a basic understanding of APIs, unit testing and how to operate a linux terminal
Getting Started with Pactflow
In this tutorial, we guide you through getting started with Pact and Pactflow.
You will create your first contract, publish it to Pactflow and verify it on your provider.
Ultimately, our goal is to get you up and integrated with Pactflow as quickly as possible!
- Learn the basic concepts of Pact.
- Get hands-on experience with the key aspects of writing, publishing and verifying pacts.
- See how Pactflow fits into the picture so that you can get up and running quickly.
Gating deployments with Pactflow
In the scenario, we extend the workshop from above, learning how to gate deployments using the
can-i-deploy tool in the process.
Learn how to prevent releasing incompatible changes to production, by using integrating
can-i-deploy into your CI/CD process.
- Build on a basic contract testing example
- Learn how Pactflow fits into the picture
- Understand important Pact CLI tools
- Learn how deployments work with Pactflow
You can complete the course at https://katacoda.com/pact/scenarios/pactflow-can-i-deploy-js.
Bi-Directional Contract Testing
Learn how to implement a Bi-Directional Contract Testing workflow from end-to-end, including integration with your CI/CD system.
You will learn how:
- To use OpenAPI as part of a contract testing strategy
- API testing tools such as Dredd or Postman can be used with Pactflow
- To publish contracts (such as a pact file or an OpenAPI document) to Pactflow
- To prevent deploying breaking changes to an environment, such as production
- To use existing mocking tools (such as Mountebank or Wiremock) to create a consumer contract
- Create and document an API using OpenAPI Specification
- Write tests for the API using the Dredd API testing tool
- Publish the provider contract (an OpenAPI document) to Pactflow
- Deploy the provider to production
- Write the API consumer
- Write tests for an API client using Mountebank to mock the API, and convert those mocks into a consumer contract
- Publish the consumer contract to Pactflow
- Deploy the consumer to production
- Learn about Pactflow's breaking change detection system
- Node - for the applications being tested
- Mountebank - for API mocking
- Dredd - for API Testing
- Github Actions - for CI/CD pipeline
You can complete the course at https://katacoda.com/pact/scenarios/pactflow-bi-directional-contracts-intro.