This message was deleted.
# pactflow
s
This message was deleted.
n
Also share some good jave code eg to validate publish contract as a consumer
m
Sorry what are you trying to do and what does artifictory have to do with it?
Why do you need to manually fetch pacts from the broker this way?
I would recommend using the CLI I'd you can't use the gradle or maven tasks
n
Hi don't confuse with
artifactory
I just published one contract on pactflow(IT an API contract body and endPoint). Now I want to call and check published contract
This is contract what I have publish ... now I want to validate from consumer point that provider publish contract. To validate same need to make call on server and check contract is correct or not
I want a way to access provider publish contract as a consumer
m
I’m not sure I follow what you’re trying to do. 1. You shouldn’t have to manually upload via API (why can’t you use the tools we have?) 2. You shouldn’t need to manually download the contract (the client SDKs do this) Can you explain what you’re trying to do?
n
My que as consumer point ... assume some contract already there in server ... As consumer I want to use it and write test for same
m
The contract is generated by the consumer. Once the contract is published, the provider verifies the consumer. What language are you using?
It looks like the contract was created in Pact JVM
What language are you using?
specifically, what language for both the consumer and provider?
n
Both in Java
thankyou 1
I have one case let me know is that possible Step 1. Contract is generate and publish 2. Now if I want to get details of contract (can I make API call on contract end point/body ) and validate response ?
p
/api/v1/packages
looks like an API call within your pact
m
to validate the response, you would usually setup a Pact verifier. This is how the process works with Pact: 1. Consumer writes a unit test using the Pact SDK 2. Consumer test produces a pact file 3. Consumer uploads pact file to the broker (e.g. PactFlow) 4. Provider writes a verification test 5. The verifier is configured to download the contracts from the broker 6. The verifier reads each interaction from the contract, and replays against a locally running provider API
See diagram here: https://docs.pact.io/
also workshops 👇 (howtolearn)
s
Here are a number of useful hands-on labs that teach all of the key concepts: https://docs.pactflow.io/docs/workshops and https://docs.pact.io/implementation_guides/workshops
m
Examples (howtoexamples)
s