Tutorials
We've created a few short, in-browser tutorials using the Killercoda 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 Killercoda (the online learning platform) with GitHub, Google, Twitter or LinkedIn.

Prerequisites
To complete these tutorials, you must have:
An PactFlow On-Premises account with an active subscription
a read/write API Token from your PactFlow On-Premises account
a basic understanding of APIs, unit testing and how to operate a Linux terminal
Getting Started with PactFlow On-Premises
Level: Beginner
In this tutorial, we guide you through getting started with Pact and PactFlow On-Premises.
You will create your first contract, publish it to PactFlow On-Premises and verify it on your provider.
Goals
Ultimately, our goal is to get you up and integrated with PactFlow On-Premises as quickly as possible!
You will:
Learn the basic concepts of Pact.
Get hands-on experience with the key aspects of writing, publishing and verifying pacts.
See how PactFlow On-Premises fits into the picture so that you can get up and running quickly.
Tutorial
Generating Tests with PactFlow's AI-Augmented Contract Testing Capabilities
Level: Beginner
In this tutorial, we guide you through creating a consumer Pact test with the help of PactFlow On-Premises's Test Generation capability, featuring HaloAI.
You will download and setup the CLI tool, and generate consumer Pact tests for a JavaScript codebase.
Read more about our test generation feature, or check out our documentation here.
Goals
Learn how to quickly scaffold new pact tests from existing sources.
You will:
Learn how to install the PactFlow On-Premises AI CLI tool (
PactFlow On-Premises-ai
).Learn how to authenticate the CLI with your PactFlow On-Premises account.
Get hands-on experience with all current modes of consumer Pact test generation, including:
Traffic capture,
OpenAPI descriptions, and
Your existing code
See how test generation fits into the picture so that you can get up and running quickly.
Tutorial
You can complete the course at https://killercoda.com/pactflow/scenario/pactflow-ai.
Using Test Templates with AI-Augmented Contract Testing in PactFlow On-Premises
Level: Beginner
This tutorial introduces the Test Templates feature and shows you how to use it with PactFlow On-Premises’s AI-powered Test Generation capability, powered by HaloAI.
Learn more about Test Templates in ???.
What You'll Learn
How to create and apply a template file to generate Pact tests.
How templates help align generated tests with your existing test suite.
How to improve test output, such as adding edge case coverage, by refining your prompts.
Tutorial
Language | Link |
---|---|
Node JS | http:// https://killercoda.com/pactflow/scenario/pactflow-ai-test-templates |
Gating deployments with PactFlow On-Premises
Level: Intermediate
In the scenario, we extend the workshop from above, learning how to gate deployments using the can-i-deploy
tool in the process.
Goals
Learn how to prevent releasing incompatible changes to production, by using integrating can-i-deploy
into your CI/CD process.
You will:
Build on a basic contract testing example
Learn how PactFlow On-Premises fits into the picture
Understand important Pact CLI tools
Learn how deployments work with PactFlow On-Premises
Tutorial
You can complete the course at https://killercoda.com/pactflow/scenario/pactflow-can-i-deploy-js.
Bi-Directional Contract Testing
Level: Intermediate
Learn how to implement a Bi-Directional Contract Testing workflow from end-to-end, including integration with your CI/CD system.
Goals
You will learn how:
To use OpenAPI as part of a contract testing strategy
API testing tools such as ReadyAPI/SoapUI/Dredd or Postman can be used with PactFlow On-Premises
To publish contracts (such as a pact file or an OpenAPI document) to PactFlow On-Premises
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
Agenda
You will:
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 On-Premises
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 On-Premises
Deploy the consumer to production
Learn about PactFlow On-Premises's breaking change detection system
Tools used
Node - for the applications being tested
Mountebank - for API mocking
Dredd - for API Testing
Github Actions - for CI/CD pipeline
Tutorial
You can complete the course at https://killercoda.com/pactflow/scenario/pactflow-bi-directional-contracts-intro.