<https://test.pactflow.io/pacts/provider/pactflow-...
# pactflow
d
https://test.pactflow.io/pacts/provider/pactflow-example-provider-js-sns/consumer/pactflow-example-consumer-js-sns/latest sample link is asking for credentials. Cant login using my pactflow credentials. Please help.
m
You can’t login to Pactflow or you can’t publish to Pactflow?
Oh, the account above is a test broker and not your account. Your password won’t work there
👍 1
Where did you get that link from? Everywhere we use it should be accompanied by the user/pass e.g. https://docs.pactflow.io/docs/examples/js/provider/
howtoexamples
s
m
find examples there ☝️
y
d
Thanks for the response. I have got the above link from https://docs.pactflow.io/docs/examples/js/provider/. "The latest version of the Example Pactflow Consumer/Example Pactflow Provider pact is published here." The here opens the page and asks for credentials. So I have asked for the credentials to see the latest examples.
@Matt (pactflow.io / pact-js / pact-go) @Yousaf Nabi (pactflow.io) I do have the yml document of the event data model. Is there a way to convert that to a json object for pact? As we upload the swagger documents in open API format to the pact flow.
y
It is using a public tenant on Pactflow, which you can access here using the credentials `dXfltyFMgNOFZAxr8io9wJ37iUpY42M`/`O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1`. The latest version of the Example Pactflow Consumer/Example Pactflow Provider pact is published here.
Details in the readme for the public credentials
I do have the yml document of the event data model. Is there a way to convert that to a json object for pact? As we upload the swagger documents in open API format to the pact flow.
This is an SNS based example which wouldn’t use OpenAPI. What have you got documented in the OpenAPI? Are you trying to test a message based consumer, with Bi-Directional Contract testing?
m
We don't support AsyncAPI If that's what you're asking ?
d
yes I want to test a message based consumer with BDC.
one of my provider is in Java.
m
We don't support that yet sorry. It's something we're aiming for in Q1 2023 (current target)
d
okay.
👍 1
so I need to follow your examples for the provider for the async api for provider?
1
can you please give me a java example for the message pact provider?
y
Please see https://docs.pactflow.io/docs/examples See Kafka for a Java message based demo
d
thanks
👍 1
Hi @Yousaf Nabi (pactflow.io), I followed your java messaging provider example, now I want to run only the provider test. How to do that? I'm using maven and java. I want to run only the provider test to generate the provider pact json. Please help. Thanks
y
https://github.com/pactflow/example-provider-java-kafka run
make test
or
./gradlew clean test
- these verify pact contracts generated by the consumer application. The provider does not produce a pact file as an output of it's test phase, it generates a verification result, for the pacts its verified as returned by the providers consumer version selectors
d
okay. I'm a bit confused here. Please correct me. For http services we have Provider OpenAPi documentation which we upload to Pactflow and against which the consumer pact gets validated. I am in an impression that for messaging this will be the same. The only missing part was the openapi documentation of provider message generator. As you have already mentioned that you do not support async openapi so my expectation was the PactVerifyProvider is the place which generate the provider pact.
y
For http services we have Provider OpenAPi documentation which we upload to Pactflow and against which the consumer pact gets validated.
For Bi-Directional contract testing. Traditional Consumer-Driven contract testing will use a Pact Provider verification build, where it will pull down Pact files from a broker, which have been generated by the consumer codebases
d
@Yousaf Nabi (pactflow.io) so for messaging its only consumer driven contract testing? In your Java example the Pact gets created its from the consumer test?
y
Yes correct buddy. We are aiming for AsyncAPI support in Bi-directional contract testing in q1 2023, but currently it only supports OpenAPI specification. Consumer driven supports both HTTP and message pact.
☝️ 1
d
thanks @Yousaf Nabi (pactflow.io)
Hi @Yousaf Nabi (pactflow.io), I have one question. When a provider is associated with multiple consumers, when a new version of the provider published to Pactflow, will this update all the consumer checks? As per my understanding it tracks based on the provider name. Please correct me if I'm wrong. Thanks
m
See docs.pact.io/selectors for what pacts you are verifying and what compatibility checks you need
It doesn't update checks, because each check is associated with specific versions of the provider. The new provider version will have a check (verification result) for each pact it verifies
d
@Matt (pactflow.io / pact-js / pact-go) I was interested about message based BDC testing. I was looking for AsyncAPI support for provider. But you have mentioned that Q1 2023 is the current target for that. Is there a specific date you have when I can get that? Thanks