https://pact.io logo
Join Slack
Powered by
# general
  • t

    Thai Le

    10/20/2022, 2:12 AM
    Hello, we are using jacoco to calculate codecoverage at test phase. For our unit tests, it is working correctly, however i dont know if pact test can be count toward code coverage given that consumer test is basically a unit test and our provider test is running with junit 5 although they run in verify phase. Has anyone tried reporting pact test coverage with jacoco?
    m
    t
    a
    • 4
    • 13
  • w

    Wilson Xu

    10/20/2022, 4:41 PM
    Hi everyone, had a pretty simple question, how does pact.io determine which tests need to pass in order to generate the pact? I haven’t figure this out for scala-pact.
    t
    m
    • 3
    • 8
  • m

    Matt (pactflow.io / pact-js / pact-go)

    10/21/2022, 10:51 AM
    Recommended watching from an industry superstar:

    https://youtu.be/QFCHSEHgqFE▾

    (Especially the ~13min mark 😉)
    👍 2
  • b

    Bhavyashree R

    10/22/2022, 6:16 AM
    Hi Everyone, am new to Pact .. Is it possible to run Provider side verification by directly pointing it to stage or prod URL instead of running service locally.
    👋 1
    b
    • 2
    • 1
  • s

    slackk0t0

    10/24/2022, 7:12 AM
    Hi @channel, I’m new to Pact and in need of your guidance. I have a running api test harness locally on port 3000. I set my providerBaseUrl to this server but when I run the test I see that provider is listening to a different port. Could someone pls point what I’m missing?
    Copy code
    return new Verifier({
          providerBaseUrl: "<http://localhost:3000>", // <- location of your running provider
          pactUrls: [
            path.resolve(
              process.cwd(),
              "./pacts/sampleConsumer-sampleProvider.json"
            ),
          ],
        })
    Copy code
    [2022-10-24 06:22:28.693 +0000] TRACE (33504 on xxxxxxx): pact@10.1.4: Verifying pacts with: {"providerStatesSetupUrl":"<http://localhost:64042/_pactSetup>","provider":"sampleProvider","providerBaseUrl":"<http://localhost:64042>","pactUrls":["C:\\Users\\gwenne\\Desktop\\Workspace\\pact-sample-test\\pacts\\sampleConsumer-sampleProvider.json"],"logLevel":"TRACE","validateSSL":true,"changeOrigin":false}
    I am receiving failed test but I am not provided with a detailed error.
    Copy code
    [2022-10-24 06:22:29.452 +0000] ERROR (33504 on xxxxxxx): pact-core@13.10.0: Verification unsuccessful
    [2022-10-24 06:22:29.452 +0000] TRACE (33504 on xxxxxxx): pact@10.1.4: Verification failed(Verfication failed), closing server
    Pact verification failed :( Error: Verfication failed
        at C:\Users\d832076\Desktop\Workspace\pact-sample-test\node_modules\@pact-foundation\pact-core\src\verifier\nativeVerifier.ts:50:20
    m
    t
    • 3
    • 10
  • b

    Basu Silviu

    10/24/2022, 9:47 AM
    Hi guys. Having the pact broker deployed via-docker compose, can I create somehow the webhooks automatically when I bring the infrastructure up (by running the docker compose?)
    m
    • 2
    • 4
  • g

    Glenn Halstead

    10/24/2022, 11:08 AM
    Can Pact be used with Financial Information eXchange (FIX) protocol connections?
    m
    • 2
    • 6
  • w

    Wilson Xu

    10/24/2022, 2:20 PM
    Hi! Was looking into overriding the pactTest default command to only run tests with a certain tag. Is there any examples on how to do this?
  • j

    James P

    10/24/2022, 3:15 PM
    Hi, I had a question around approach. We have a service (Service A) that sends a message to another service (Service B) via Kafka. Service B packages up the request and then forwards onto another service (Service C). Service A and Service C have a relationship in that the data that gets send from Service A is only read by Service C and an action is performed based upon the contents of that message. My question is whether we ignore Service B and say there is a contract between A & C (where the intent of an action is understood) or I say there is a contract between A&B and then B&C (because the message is generated by one and received by another) or whether there is a contract between A&B and A&C. What would be the suggested approach in this instance? The concern is that because there is a relationship between what is sent by Service A and what is processed by Service C that the importance of the message content would be lost as Service B does not care or know about what it sends to Service C (If I was to adopt the traditional direct service to service approach)
    m
    • 2
    • 4
  • t

    Thomas K

    10/25/2022, 3:57 PM
    Hello, im trying to pinpoint an issue and wondering if anyone might have any ideas please... we've created a webhook for
    contract-requiring-verification-published
    but when we
    pact-broker test-webhook
    the
    pactbroker.providerVersionBranch
    and
    pactbroker.providerVersionNumber
    is the very latest HEAD rather than the version on
    main
    branch. The provider (as well as consumer) correctly has
    mainBranch
    property set etc, any ideas please?
    👍 1
    m
    • 2
    • 7
  • s

    Syed Muhammad Dawoud Sheraz Ali

    10/27/2022, 9:42 AM
    Hello there, how are you doing? A general question; Is consumer driven contract testing similar to API Testing? What are similarities and differences as a whole? I was recently talking about Pact with someone and they said that the contract testing is just API testing. I have explored some answers on Google but hoping to get better answers from here. Thanks
    👋 1
    y
    • 2
    • 1
  • y

    Yousaf Nabi (pactflow.io)

    10/27/2022, 11:32 AM
    Welcome to the October Pact Open Source update! I’ve got some great things to share this month – As always, we have a focus on our community heroes, this time we have @Paulo Gonçalves, Holly Cummins, @Eric Deandrea & @Liran Tal https://docs.pact.io/blog/2022/10/25/pact-open-source-update-october-2022 Plus a sneak peak of our upcoming Pact Plugin Framework launch which you can sign up to here https://docs.pact.io/events/plugins-framework-launch This the culmination of several years of work, and we believe it's going to be a game changer for organisations who love contract testing but can't apply it to various aspects of their organisation because a particular technology isn't supported. Plugins will enable you to extend the capabilities of Pact, without having to make changes to the Pact framework itself. For example, you could create a plugin to handle the Avro or GraphQL content types, or create a websockets transport. You can even test out gRPC with one of our first plugins, we would love you to try it out. Also whilst I have you, you can checkout the state of API quality 2021 here https://smartbear.com/state-of-software-quality/api/ and participate in our 2022 survey, it will take around 15 mins and as a thank you, SmartBear will make a donation to a charity for each survey completed! https://www.surveymonkey.com/r/QF2C6M7 Whichever way you want to get involved, don't hesitate to reach out! Thanks all <3 - Saf
    🎉 5
    🙌 3
    🔌 3
  • w

    Wilson Xu

    10/28/2022, 1:57 PM
    Hi Had a question on this page: https://docs.pact.io/getting_started/matching Are the
    Pact::SomethingLike
    functions, for example
    Pact.like(73)
    , available in all versions of the pact specification? I haven’t been able to find an example for scala-pact, but I know that it only supports up to v2
    y
    • 2
    • 2
  • p

    Pavithra Navaneeth

    10/30/2022, 10:52 PM
    Hello Team, I have a generic question w.r.t pact consumer. Does pact support letting the consumer to generate the pact json file by hitting the real provider service instead of hitting the provider using pact mock server ? We are starting the contract testing newly in our org and our stakeholders are interested to use the live service at the first place to generate the contract (as we have 1000+ micro services already up in production) and for those existing ones - preferring to use live rather than mock at the consumer end. Really looking forward for your response !
    m
    t
    • 3
    • 11
  • j

    Jayesh Guru

    10/31/2022, 12:11 PM
    Hello Team, Need help with Pact matching for response body. I have a big response body json of 2000 lines where we have array of templates object. I just want to match 1 object out of 100 templates. I am getting error with failure in matching when I tried this
    Copy code
    asset_classifier_pact.given(
            "mpid and brand catalog id to retrieve templates"
        ).upon_receiving("return all templates for mpid").with_request(
            method="GET",
            path=api_path,
            query=req_query_param,
            headers=req_headers,
        ).will_respond_with(
            status=200,
            body={
                "templates_are_approved_for_auto_select": None,
                "templates": EachLike(
                    {
                        "id": 1,
                        "asset_id": "<any-uuid>",
                        "factory_source_id": 1,
                        "factory_id": "1",
                        "is_manual_selection": False,
                        "status_id": 3,
                        "associations": [
                            {
                                "association_id": 1,
                                "association_source": 1,
                                "imagery_template_id": 1,
                                "id": 1,
                            }
                        ],
                        "manufacturer_part_id": 1,
                        "class_id": 1,
                        "bounding_box": {
                            "minimum_width": 34.0,
                            "minimum_height": 35.0,
                            "minimum_depth": 1.0,
                            "maximum_width": 40.0,
                            "maximum_height": 40.0,
                            "maximum_depth": 3.0,
                        },
                        "gs_type_name": "WallMirrorLargeRound",
                        "optimized_for_automation": "No",
                    }
                ),
            },
        )
    y
    s
    • 3
    • 6
  • t

    Thomas K

    10/31/2022, 1:25 PM
    Hello 👋 I am trying to do a
    pact-broker describe-version
    command for a latest pacticipant in environment
    prod
    , but am having trouble as it looks like you can only use a
    --tag
    in the command, but we instead use branches and environments so when i do something like
    Copy code
    pact-broker describe-version -a ProviderService --l prod
    I get
    Pacticipant version not found
    any ideas please?? 🙏
    y
    • 2
    • 31
  • t

    Tony Nguyen

    10/31/2022, 3:43 PM
    Hi, has anyone seen this issue when contract publishing in pact CLI using pactflow version 1.21.0?
    Copy code
    Exception: ArgumentError: comparison of Integer with nil failed
    y
    • 2
    • 7
  • j

    Jane Wheatley

    10/31/2022, 6:17 PM
    General question here after feedback from my dev team. We have a proof of concept implemented with Pact right now in our CI pipeline across 2 teams. One complaint I am hearing is that since Pact does not test data changes, only changes to the endpoint structure, we aren't really catching anything important. We usually do not encounter changes to our endpoint structure. What are peoples' thoughts on this critique?
    👋 1
    y
    l
    • 3
    • 15
  • t

    Thomas K

    11/01/2022, 5:32 PM
    Hello, anyone possibly have any ideas why I occasionally get this error in CI doing a Docker run command for publishing pacts? (In thread as on phone so can’t format properly)
    • 1
    • 1
  • w

    Wei Huang

    11/02/2022, 5:57 AM
    Hi, does pact test helps only when both consumer and provider use it? what if I want to test my system’s contract with 3rd party system, but the other side doesn’t use pact?
    b
    m
    t
    • 4
    • 6
  • t

    Thomas K

    11/02/2022, 11:02 AM
    Hello, we have successfully added the
    contract_requiring_verification_published
    webhook, but I am now wondering if we need to add a webhook to trigger consumer build when provider verification is published or not, I see it in the diagram but its not clear if I actually need it or not, as once I add
    can-i-deploy
    I can use the
    --retry-while-unknown
    parameter? Or am I missing something obvious here? Thanks
    m
    y
    • 3
    • 8
  • g

    Gustavo Souza

    11/02/2022, 2:32 PM
    👋 Hi everyone! I'm using pact.io to create an poc in my company and ai have have follow the steps and here is the output after run the test:
    Copy code
    [2022-11-02 14:26:59.845 +0000] ERROR (23344 on Ghsouza): pact-core@13.11.0: !!!!!!!!! PACT CRASHED !!!!!!!!!
                                                                                                                                                                                                             
    The pact consumer core returned false at 'withResponseBody'. This
    should only happen if the core methods were invoked out of order
    
    This is almost certainly a bug in pact-js-core. It would be great if you could
    open a bug report at: <https://github.com/pact-foundation/pact-js-core/issues>
    so that we can fix it.
    
    There is additional debugging information above. If you open a bug report,
    is there anything that i can do it to avoid this message?!
    y
    m
    • 3
    • 10
  • t

    Thomas K

    11/02/2022, 3:42 PM
    Hello again, one last question on
    can-i-deploy
    please… We have one consumer app
    Foo
    that consumes let’s say 2 different providers We have all our provider verification tests etc in place for only one of those providers. For the other provider, those verification tests have not been added yet and we only have the consumer side expectations/tests done. This thus fails in
    can-i-deploy
    step because one of the providers hasnt got any verification tests/results, and we are using the same consumer name pacticipant
    Foo
    in all cases, as its all the same single consumer app. I can see a way around this would be to use different consumer pacticipant names for our contracts between provider
    A
    and our contracts between provider
    B
    , but is this the correct approach? Shouldn’t we just have one consumer pacticipant? But then what do we do in the situation where we are still waiting on provider tests to be added for a provider? Thanks.
    t
    • 2
    • 27
  • t

    Tatiana

    11/04/2022, 6:38 PM
    Hello, could you please tell me if Pact can be used for non-HTTP protocols? Can it be used in AWS, for example for eventhubs? If you have a documentation, please share 🙏
    l
    • 2
    • 2
  • l

    Lucas Dicesaro

    11/04/2022, 10:23 PM
    Hey people. I have a few questions. Please, let me know if I should post them on a specific channel. Thanks 🧵
    b
    • 2
    • 8
  • j

    Jonathan Halterman

    11/07/2022, 4:38 PM
    Hi all - I'm investigating using Pact on a project and have read through all the docs, but could use help better understanding what sort of test cases to use pact for. A few questions: - Is contract testing mainly about catching breaking structural API changes? If it goes beyond that, how do you determine where to draw the line between functional tests? - If there are several ways we can populate an update (PUT) request which lead to different values in the response, would we want to test several of those, or just one overall test for an update? - We have some large requests that encompass several smaller components. Do we want to have tests that cover the entire large object in addition to tests for the smaller components?
    t
    m
    j
    • 4
    • 39
  • j

    James Ferguson

    11/08/2022, 12:36 PM
    Hi team, I am setting up pactflow for our business and it seems that we've merged two accounts into one. Depending on who's screen you look at (all admins in the same org) we get different information about our subscription, billing, etc. Can you please provide support to ensure we're all on the same 'instance' of pact? Thanks
    m
    • 2
    • 7
  • j

    Jonathan Halterman

    11/08/2022, 7:28 PM
    (Starting a new thread since this is a somewhat different topic) - I have a messaging use case where a service consumes a message and emits one or more messages in response, which are in turn consumer by other services. I can use pact to assert that the consumed message is as expected, but I'd also like to assert that the emitted messages are as expected, based on the consumed message, similar to how pact works with Http request/response tests. Here's a diagram to illustrate what I mean. The labels on the left indicate how each service emits messages that are derived from the message it consumes. But really, this is similar to a request/response flow, which the labels on the right illustrate. I'd like to be able to verify this type of situation by asserting the incoming messages (requests) and the emitted messages (responses) for each service. Any thoughts on this? Is there a way to accomplish this?
    t
    • 2
    • 25
  • b

    Bas Dijkstra

    11/09/2022, 12:43 PM
    I'm working with a client on their contract testing implementation, and we're currently doing CDCT with Pact. I could use some views on how and where to make the consumer and provider test steps part of the respective pipelines. Services deploy to a DEV environment multiple times a day through a PR build process. At some point, a release candidate is put together for deployment into a QA environment. Not every PR leads to a new artefact version, hell, most of them don't (i.e., the version in the pom.xml), and I'm not even entirely sure that every RC does (but I'm checking that at the moment). I would love to see both consumer contract generation and publishing tests, as well as provider verification tests, run as often as possible, i.e., on every PR build, no matter what the change is. The earlier we can catch integration issues, the better.. However, I'm not sure if it is possible to publish changes to a contract without an artefact version bump? If that's not possible, I think we need to start having a serious talk with the various dev teams to get their versioning in order.. I'd love to hear some experiences from others about the frequency with which they run their contract tests, what that brought them and what things they had to keep in mind. How much do you really shift to the left with your contract tests?
    👋 1
    t
    m
    u
    • 4
    • 44
  • m

    Matt (pactflow.io / pact-js / pact-go)

    11/10/2022, 2:00 PM
    Your favourite contract testing solution is now Pact with more power ⚡*️* We’ve been tempting you for some time... and now we officially launch the Pact Plugin Framework - the missing piece to help you add contract testing to all your applications. If you’ve been held up applying contract testing to a specific use case – protocols like Protobufs, GraphQL, transports such as gRPC, Websockets and MQTT, Event Driven Architectures and data pipelines or emerging standards such as AsyncAPI and CloudEvent – consider the blockers abolished! Developers can now build plugins for their custom needs, whether they open source the plugin or keep it closed source for in house only usage. Members of this channel will know this is a substantial innovation. By having a single generic interface, the Plugin Framework side steps the problems of requiring the input of core maintainers to support a new feature and its constituent concepts that must be built into each client language. What to get started? • 💻 Join the launch webinar with @Yousaf Nabi (pactflow.io) and me on Wed 30 Nov & Thurs 1 Dec (register here) • 📚 Get stuck into some reading <!channel>
    👏 10
    👀 5
    🎉 21
    j
    a
    t
    • 4
    • 4
1...101112...18Latest