question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish verification results to pact broker JUnit4

See original GitHub issue

Hello, 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:

  1. Execute on terminal: ./gradlew clean test -Dpact.provider.version=1.0.0 -Dpact.verifier.publishResults=true
  2. 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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yesid-lopezcommented, Oct 23, 2019

Forget it, it also works using -Dpact.verifier.publishResults=true

1reaction
roioteromoralescommented, Oct 22, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found