https://github.com/pactflow/example-consumer-java-junit
Example Java JUnit consumer
https://github.com/pactflow/example-consumer-java-junit
example
Last synced: 9 months ago
JSON representation
Example Java JUnit consumer
- Host: GitHub
- URL: https://github.com/pactflow/example-consumer-java-junit
- Owner: pactflow
- License: mit
- Created: 2020-12-07T07:51:54.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-14T01:36:31.000Z (11 months ago)
- Last Synced: 2025-04-15T06:47:58.526Z (9 months ago)
- Topics: example
- Language: Java
- Size: 135 KB
- Stars: 10
- Watchers: 10
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example Java Junit Consumer
[](https://github.com/pactflow/example-consumer-java-junit/actions/workflows/build.yml)

This is an example of a Java consumer that uses Pact with Junit, [PactFlow](https://pactflow.io) and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.
The project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.
It is using a public tenant on PactFlow, which you can access [here](https://testdemo.pactflow.io) using the credentials `dXfltyFMgNOFZAxr8io9wJ37iUpY42M`/`O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1`.
See the canonical consumer example here: https://github.com/pactflow/example-consumer
See also the full [PactFlow CI/CD Workshop](https://docs.pactflow.io/docs/workshops/ci-cd) for which this can be substituted in as the "consumer".
## Pre-requisites
**Software**:
https://docs.pactflow.io/docs/workshops/ci-cd/set-up-ci/prerequisites/
## Usage
```sh
make test
```