Getting Started with Pactflow
Pactflow is a fully-managed, highly-available, and hardened deployment of the open source "Pact Broker" with a re-imagined user experience. It allows you to integrate Pact into your CI/CD pipelines by providing a central point for managing your consumer driven contracts.
#
Tutorials#
VideosWe've created an introductory level video series on contract-testing to help you learn and understand what it's all about.
#
WorkshopsTo get you started, we have created a several short in-browser tutorials. If you're new to Pact, or want some help integrating to Pactflow, you should start here.
If you want something a little more in-depth, check out Pactflow University.
#
Essential readingHere are some key resources to help you on your way:
- How Pact works
- The Pact Broker overview
- Versioning in the Pact Broker
- General Pact documentation
- You can find documentation on all the Pactflow screens under Pactflow User Interface.
We also have a Slack workspace where you can chat with other members and get general support with the product. Join us by registering here.
If you need general Pact support, we have a number of channels you can reach us on:
If you need Pactflow specific support, you can email us at support@pactflow.io.
#
Configuring your API tokenNOTE: You cannot use your username and password to access the Pactflow API.
To publish or verify pacts you need to use one of the bearer tokens from the API Tokens section of your Pactflow settings page.
Open your Pactflow account in a browser and log in with your username and password. Click on the settings icon (the cog wheel icon at the top right of the screen).
You will see the API Tokens page with two tokens listed - a read only token, and a read/write token.
Pacts and verification results are generally only published from a CI machine, so use the read only token on a local development machine, and keep the read/write token for CI.
While each of the following examples shows the use of a hardcoded token, note that you would normally be accessing the token via an environment variable or build parameter that is stored and provided in a secure manner (eg. a Jenkins build secret or a Travis encrypted environment variable).
To configure the token:
#
ConsumerSee the Pact-JS documentation for all the pact publication options.
#
ProviderSee the Pact-JS documentation for all the pact verification options.
#
ConsumerSee the Pact-JVM documentation for all the pact publication options.
#
ProviderSee the Pact-JVM documentation for all the pact verification options.
#
ConsumerSee the Gradle documentation.
#
Provider#
ConsumerSee the Gradle documentation.
#
Provider#
Consumer#
Provider#
ConsumerSee the Pact Ruby documentation for all the pact publishing options.
#
ProviderSee the Pact Ruby documentation for all the verification options.
#
Consumer#
PowerShell#
C#See the PactNet documentation for all the pact publishing options.
#
ProviderSee the PactNet documentation for all the pact verification options.
#
ConsumerSee the Pact CLI Docker documentation for all the pact publishing options.