Skip to content

Commit

Permalink
docs: Update junit README for WIP pact support
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Endsley authored and Phil Endsley committed Jun 25, 2020
1 parent b3d6d19 commit 2d99c5e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions provider/junit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,24 @@ public class PactJUnitTest {
You can also use the `pactbroker.enablePending` and `pactbroker.providerTags` JVM system properties.

Then any pending pacts will not cause a build failure.

# Work In Progress (WIP) Pact Support (version 4.1.5 and later)

If your Pact broker supports wip pacts, you can enable support by enabling it on your Pact broker annotation, or with
JVM system properties. You also need to enable pending pacts. Once enabled, your provider will verify any "work in progress"
pacts that have been published since a given date. A WIP pact is a pact that is the latest for its tag that does not have
any successful verification results with the provider tag.

```java
@Provider("Activity Service")
@PactBroker(host = "test.pactflow.io", tags = {"test"}, scheme = "https",
enablePendingPacts = "true",
providerTags = "master"
includeWipPactsSince = "2020-06-19"
)
public class PactJUnitTest {
```

You can also use the `pactbroker.includeWipPactsSince` JVM system property.

Since all WIP pacts are also pending pacts, failed verifications will not cause a build failure.
4 changes: 4 additions & 0 deletions provider/junit5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,7 @@ public class PactJUnitTest {
You can also use the `pactbroker.enablePending` and `pactbroker.providerTags` JVM system properties.

Then any pending pacts will not cause a build failure.

# Work In Progress (WIP) Pact Support (version 4.1.5 and later)

WIP pacts work in the same way as with JUnit 4 tests, refer to the [Pact junit runner](../junit/README.md) docs.

0 comments on commit 2d99c5e

Please sign in to comment.