skattela / pact-workshop-jvm-quarkus

Example Quarkus project for the Pact workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contract Testing with Pact & Quarkus

For the demo, I set up a consumer and provider service with quarkus.
The consumer provides a rest api interface and, when called, it sends another request to the provider service.
The provider provides a rest api interface and, when called, it sends a response "Hello from your Provider!".

Overview

Run project

Clone this repository or follow the WORKSHOP to create the project from scratch.

Run provider

provider ❯ ./mvnw quarkus:dev

Visit http://localhost:8080

Run consumer

consumer ❯ ./mvnw quarkus:dev

Visit http://localhost:9090

Create (consumer driven) contract

(If a provider is running, kill it to make sure that port 8080 is available)

consumer ❯ ./mvnw test

Pact contract is stored at: consumer/target/pacts

Test provider against contract

(If a provider is running, kill it to make sure that port 8080 is available)

provider ❯ ./mvnw test

About

Example Quarkus project for the Pact workshop

License:MIT License


Languages

Language:Java 94.7%Language:HTML 5.3%