Publish test status to broker - pact.verifier.publishResults not been read
See original GitHub issueHi, I’m trying to publish provider tests results to pact-broker with pact-jvm-provider-junit, on documentation they say to set the property
pact.verifier.publishResults
to true.
When I’m running
./gradlew clean -Ppact.verifier.publishResults=true build
The tests status is not updated on broker and I got the message:
[Test worker] WARN au.com.dius.pact.provider.junit.InteractionRunner - Skipping publishing of verification results (pact.verifier.publishResults is not set to 'true')
So, my question is, what’s the alternative way to load properties using gradle? Does someone had a similar problem?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Publish test status to broker - pact.verifier.publishResults not ...
Hi, I'm trying to publish provider tests results to pact-broker with pact-jvm-provider-junit, on documentation they say to set the property
Read more >Unable to publish the 'Last Verified' status in PACT Broker
I saw some documentation around 'pact.verifier.publishResults=true' and tried to pass as gradle parameter, but I got an error message saying:.
Read more >Pact junit runner | Pact Docs
Just passing them in on the command line won't work, as they will not be available to the test JVM that is running...
Read more >Consumer Driven Contract Tests - Part 2 - Swapnil Sankla
Pact looks for an environment variable pact.verifier.publishResults and if it is set to true then the results are published. One can set this ......
Read more >Integration into build pipeline with Pact Broker and Jenkins
To enable the publishing, the flag pact.verifier.publishResults needs to be set to true in the Jenkinsfile. Additionally, the provider version ...
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
Hi, I’m aware this is way too late now for the originator of this question. But, for future requests. In your project’s build.gradle file, within your “test” task, add the following: test { … systemProperties[‘pact.verifier.publishResults’] = true }
NOTE: if you only want to publish contracts when they are validated by the pipeline/build process, you may want to “conditionalize” the above statement.
Example: test { … if (System.getenv(‘JENKINS_HOME’)){ systemProperties[‘pact.verifier.publishResults’] = true } } //Where JENKINS_HOME is an environment variable defined/set by Jenkins at build-time.
It just for information, maybe in gradle you can set project variable something like in maven.