Skip to content

Commit

Permalink
updated gradle plugin doco to include provider state info
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Aug 6, 2014
1 parent 9e9ed5f commit 4d850e7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pact-jvm-provider-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,31 @@ The following project properties can be specified with `-Pproperty=value` on the
|Property|Description|
|--------|-----------|
|pact.showStacktrace|This turns on stacktrace printing for each request. It can help with diagnosing network errors|

## Provider States

For each provider you can specify a state change URL to use to switch the state of the provider. This URL will
receive the providerState description from the pact file before each interaction via a POST.

```
pact {
serviceProviders {
provider1 {
hasPactWith('consumer1') {
pactFile = file('path/to/provider1-consumer1-pact.json')
stateChange = url('http://localhost:8001/tasks/pactStateChange')
stateChangeUsesBody = false // defaults to true
}
}
}
}
```

If the `stateChangeUsesBody` is not specified, or is set to true, then the provider state description will be sent as
JSON in the body of the request. If it is set to false, it will passed as a query parameter.

0 comments on commit 4d850e7

Please sign in to comment.