Publish verification results to pact broker JUnit4
See original GitHub issueHello, I’ve been trying to uploads the verification results to a local broker but does not work. I’m following this instructions https://github.com/DiUS/pact-jvm/tree/master/provider/pact-jvm-provider-junit#publishing-verification-results-to-a-pact-broker. Before all, these are my class annotations:
@RunWith(RestPactRunner.class)
@Provider("clarifi-loan-handler-service")
@PactBroker(host = "localhost", port = "80")
class DocProcessingContractSpec {
These are my attemps:
- Execute on terminal:
./gradlew clean test -Dpact.provider.version=1.0.0 -Dpact.verifier.publishResults=true
- Add properties using the following code:
@RunWith(RestPactRunner.class)
@Provider("clarifi-loan-handler-service")
@PactBroker(host = "localhost", port = "80")
@SpringBootTest(
properties=
["pact.verifier.publishResults=true", "pact.provider.version=1.0.0"]
)
It looks that the pact is downloaded and tested against it but does not uploads any verification report… Please help! hahaha
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Publish verification results to pact broker is not working in pact ...
I am trying to publish the verification results to pact broker with pact for jvm/spring. I am using junit4. The test is executed...
Read more >Pact junit runner | Pact Docs
For pacts that are loaded from a Pact Broker, the results of running the verification can be published back to the broker against...
Read more >Publish verification results to pact broker is not working in pact ...
Hi, I am trying to publish the verification results to pact broker with pact for jvm/spring. I am using junit4. The test is...
Read more >Pactflow Documentation: Getting Started with Pactflow
To publish or verify contracts you need to use one of the bearer tokens from the API Tokens section of your Pactflow settings...
Read more >Publish verification results to pact broker is not working in pact ...
Coding example for the question Publish verification results to pact broker is not working in pact-jvm-provider-spring_2.12-Springboot.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Forget it, it also works using
-Dpact.verifier.publishResults=true
I had a similar issue using the
au.com.dius:pact-jvm-provider-spring:4.0.1
For me it didnt read the properties from spring or env, so i had to put it in the system properties. I put in gradle this in the test task:systemProperties['pact.verifier.publishResults'] = System.getenv("PACT_PUBLISH_RESULTS") ?: "false"
Then you set up your environment variable
PACT_PUBLISH_RESULTS