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

    Feisal Ahmad

    03/31/2025, 3:22 PM
    We’re working on using matchers using the
    pactffi_matches_json_value
    function, and are seeing some unexpected behavior for some more advanced rules where the check passes even though it shouldn’t… For example, with an
    arrayContains
    matching rule, no error is returned even though an array with one element that doesn’t satisfy the matching rules is passed to it. Here’s the line in the pactffi log for the check:
    Copy code
    2025-03-31T15:16:12.632536Z DEBUG ThreadId(01) pact_matching::json: JSON -> JSON: Comparing '[{"baz":42,"foo":"bar"}]' to '["bla"]' using ArrayContains([(0, MatchingRuleCategory { name: BODY, rules: {DocPath { path_tokens: [Root, Field("baz")], expr: "$.baz" }: RuleList { rules: [Type], rule_logic: And, cascaded: false }} }, {})]) -> Ok(())
    We’re using pactffi release 0.4.26 btw, am I missing something here?
    m
    • 2
    • 3
  • g

    Gustavo Souza

    04/03/2025, 7:30 PM
    Hey team, Im facing this error once I try to log in:
    Error.
    412: We only support one authentication type at this time. Please try the type you used to sign up with.
    m
    • 2
    • 6
  • o

    Otoniel Rodriguez Delgado

    04/04/2025, 5:19 PM
    Hi I would like to know if it is possible to configure Pactflow to automatically assign users to teams upon authentication via SSO, for example, using Azure Active Directory (Azure AD). The goal is for Pactflow to map the groups a user belongs to in the Active Directory (AD) during the login process, and based on that information, automatically assign them to one or more specific teams within the platform. This would allow the appropriate permissions and roles to be applied from the first login, without requiring manual assignments. Is it possible to enable this functionality to map SSO groups to Pactflow teams?
  • j

    Jun Yi

    04/10/2025, 3:14 AM
    Hi team, I’m looking for some advice on our current Provider's CI/CD setup with Pact Broker. We have two separate branches:
    staging
    and
    production
    , which may contain different code as features are tested in staging before being rolled out to production. 1. Would it make sense to maintain separate sets of Pact stages for each branch? 2. I've observed that when a webhook is triggered, the verification always runs against the main branch (staging), regardless of which branch initiated the process. This could potentially cause issues when the branches diverge. Any suggestions on how we can improve this setup or handle branch-specific verification more effectively? Thanks! Slack Conversation
  • a

    Alan Wong

    04/25/2025, 1:14 PM
    Hi. I have a json structure like this:
    Copy code
    {
      "data": [
        {
          "id": "123456789"
        },
        {
          "id": "111111111",
          "optional_stuff": {
            "data_map": {
              "blah_1": true,
              "blah_2": 123456
            }
          }
        }
      ]
    }
    So my question is how to write the pact contract such that
    "id"
    is mandatory but
    "optional_stuff"
    is optional? At the moment I have to only specify the
    "id"
    part as it's unclear if pact supports optional data.
    y
    b
    • 3
    • 4
  • t

    Tú Phạm

    04/26/2025, 3:54 AM
    Hi, I think I have a common question but I couldn't find a guide for it so I decide to ask here. What should we do to write a consumer test for a retrieve endpoint that requires resource ID to be generated automatically on the provider side?
    b
    • 2
    • 3
  • j

    Jun Yi

    04/28/2025, 3:33 AM
    Hi, I'm currently using Pact Python v3, and I'm trying to implement consumer version selectors with a version for a specific consumer. However, I couldn't find any documentation or guides specifically for version 3. Is it possible to add a consumer version selector in this version of Pact Python? Below is the code I’m currently working with:
    Copy code
    verifier = Verifier().set_info(name=PROVIDER_NAME, url=PROVIDER_URL)
    verifier.broker_source(url=URL(settings.pact_flow_url), token=settings.pact_broker_token)
    verifier.set_state(url=PROVIDER_URL / "_pact" / "callback", teardown=True)
    verifier.filter_consumers(consumer_name)
    verifier.set_publish_options(version=str(version))
    verifier.verify()
    Thanks for your help!
    y
    • 2
    • 2
  • a

    Alessandro

    05/07/2025, 11:39 AM
    We have been using the pact-stub-server and found some serious performance enhancements. Is this the right place to discuss them? https://github.com/pact-foundation/pact-stub-server/issues/76 🙂
    m
    • 2
    • 2
  • p

    Pavanraj Ramisetty

    05/07/2025, 9:55 PM
    Hi This is pavanraj from atlassian, we have use-case of asynchronous api, 1. The api accepts the order and responds with 202. 2. Consumer polls on get order, based on the type of order placed, there will be fields set in the response. What is the recommendation for writing contract tests ? How do i get the confidence that any modification in order processing flow would ensure fields are populated as expected for the use-case ?
    b
    m
    • 3
    • 6
  • p

    Pascal

    05/08/2025, 2:36 PM
    👋 Hi everyone!
  • p

    Pascal

    05/08/2025, 2:36 PM
    Hi has anyone here ever renamed existing providers ? or has anyone ever provided providers that have no consumers ? So we have a microservice and therefore pacts were moved there. To know which contract belongs to whom we have changed the names. Unfortunately, I can no longer deploy or I can't do a can-i-deploy because there are no consumers or they simply still listen to the old providers. I wanted to ask how you deal with this?
  • p

    Pascal

    05/08/2025, 2:45 PM
    I should mention that the consumers are in other teams so I can't change them so easily
  • p

    Pavanraj Ramisetty

    05/09/2025, 5:32 AM
    https://pact-foundation.slack.com/archives/C5F4KFKR8/p1746768702503109?thread_ts=1746654916.048469&cid=C5F4KFKR8
  • v

    Vignesh

    05/12/2025, 1:22 PM
    Hey everyone I am looking for sample pact elixir project. I already searched in the pact-foundation repo But could not find it. Do we have any sample repo as example of pact API + async message working with Elixir? It would be great if anyone helps over here Thanks in advance.
    y
    • 2
    • 3
  • t

    Tim Vahlbrock

    05/14/2025, 12:54 PM
    Hello everyone, is there a recommended way to deal with Branches in Tag Pipelines? The GitLab Tag Pipelines have no branch name set. From what I have come up with I have two options: 1. Use the default branch name (which the tags are always made on). Then in validation pipelines that are triggered by webhooks I can check that out and reset to the tag. 2. Use no branch name. In webhook pipelines I would then checkout the tag detached. Are there any more consequences in using one or the other?
    m
    • 2
    • 3
  • a

    Antonio Blandón Torres

    05/16/2025, 9:40 PM
    Hope you're doing well. We are currently working on improving how we visualize our contract test results. Specifically, we would like to build a dashboard that can display these results, broken down by the different teams involved. We are exploring options for tools or platforms that could help us achieve this. Do you have any recommendations or experience with tools that are well-suited for creating dashboards of contract test results, particularly those that can show results per team? Any suggestions or insights you could provide would be greatly appreciated. Thank you for your time and assistance.
    m
    • 2
    • 1
  • m

    Martin Konir

    05/21/2025, 10:35 AM
    Hi everyone 👋 Our team is considering using Pact for contract testing of message flows over Kafka and Apache Pulsar, while also leveraging the Schema Registry in both systems for schema validation ( with
    BACKWARD
    compatibility type). Could you help clarify the main business cases for using both Pact and Schema Registry together? Specifically: • If we are already using the Schema Registry to enforce message structure and compatibility, does Pact contract testing become redundant? • Or does Pact provide additional value beyond schema validation? • If we decided to write contract tests for a Apache Pulsar messaging system, does Pact have any sort of integration - is it ready for that? (I wasn't able to find the necessary materials on this topic - everything is kafka centered 😅). Thank you very much for your insights!
    m
    • 2
    • 2
  • m

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

    05/27/2025, 4:48 AM
    📣 Introducing PactFlow’s AI Test Templates + 5 New Languages for Contract Testing AI Generation! 🚀 We’ve recently dropped a few major features to PactFlow’s AI capabilities that I wanted to share with you all: Test Templates and 5 new languages. If you’re using Pact regularly and are looking for ways to accelerate adoption across your teams, PactFlow’s AI features are worth checking out. 🎯*Key Capabilities and Benefits:* 1. Test Templates improves consistency and efficiency, reducing additional manual refactoring work + better “one-shot” test generation: a. Specify Code-Based Test Templates – Provide a local code-based template to use as a basis generated test output. b. Guided Templates – Include additional prompts or instructions to target additional use cases, or further customise output. c. RBAC Integration – Restrict template usage with PactFlow’s role-based access controls. 2. New Language Support - Generate tests in Go, .NET, Kotlin, Swift, and PHP, in addition to Java and JS/TypeScript. 📚 Dive Deeper • Documentation: https://docs.pactflow.io/docs/ai/ • Get hands-on with our workshop: https://docs.pactflow.io/docs/tutorials#use-test-templates-with-ai-augmented-contract-testing-in-pactflow 👉 Show me! Read the blog and watch a short video showcasing the feature: https://pactflow.io/blog/ai-test-templates/. AI features are enabled on all plans - including trials - if you’d like to test it out (start here). 🛣️ What’s next? We’re currently working on Code Review, and will soon turn our attention to MCP support (for better IDE, tool and agentic AI support). Have something you’d like to see there? Reply to this thread, DM me or create/comment on an issue on the roadmap.
  • j

    Jordan Nazemi

    06/03/2025, 3:21 PM
    Not sure which channel this should go in, but I had a small issue with Pact using the Cypress adapter I had a question about. We use bi-directional contracts with Cypress to generate pacts on the frontend consumer. One of our providers uses a
    API Base URL
    in their OAS. When we try to generate Pacts with Cypress for it on the frontend, the entire path (include that base URL) is provided as the consumer contract. The issue is, Pactflow doesn't seem to match it with the base URL and were having to strip it from the JSON before pushing it up to Pactflow. ie • Consumer pact states the path is
    service/v1/endpoint
    • Provider states the base url is
    service/v1
    and the endpoint is
    /endpoint
    • Pactflow marks the two as incompatible UNLESS we strip the
    service/v1
    from the JSON generated by the Cypress Pact adapter before we push it to Pactflow Any ideas of a better solution that stripping?
    m
    • 2
    • 2
  • e

    Erich Zimmerman

    06/17/2025, 5:46 PM
    Hello, this is more about Contract testing overall. We have a pair of services that work together: an Ingress service (proxy), which provides authorization, and then an implementation service that does the actual work. Any client will simply call the Ingress service, which will authorize the caller, then pass the request along to the implementation service. From a contract testing standpoint, the general rule would be to define contracts between the outside consumer and ingress, and then between ingress and implementation. But practically, that doesn't really make sense. My general idea would be to treat the two services as effectively one service, but then I'm not sure how to set that up for proper testing. But one problem at a time. 🙂
    m
    • 2
    • 2
  • d

    Dilip Punna

    06/19/2025, 5:00 PM
    Hi 👋, do we have any examples for pactflow contract tests kafka event driven systems using Python?
    m
    • 2
    • 3
  • z

    Zachary Lysobey

    06/20/2025, 12:23 AM
    can someone help verify if the pact.io website is broken? Or is it just me
    https://pact.io/
    it seems like maybe the JS is broken on the page, and doing stuff like clicking
    view on Github
    doesn't work for me
    m
    • 2
    • 6
  • b

    Bogdan Barliga

    06/23/2025, 1:30 PM
    Hello, Is there a way to express that a response should contain a particular key, but that its value should be an opaque Json object? I appreciate that pact is not really designed for pass-through scenarios, but wondered if this could still be expressed.
    m
    • 2
    • 8
  • d

    Dmitry Munda

    07/01/2025, 11:49 AM
    hello i see
    interactionId
    in HAL browser, not user-friendly names. is it something new-ish ?
    Copy code
    "testResults": [{
          "interactionId": "0eac6b0ba31719c60b6d5d0c1a5a1ceab75943c2",
          "mismatches": [{
              "attribute": "body",
              "description": "Actual map is missing the following keys: reason",
              "identifier": "$"
            }],
          "success": false
        },... {
          "interactionId": "30ac1652bdc5ce4d8109d0ccabb4b99f6adc0013",
          "success": true
        }]
    👋 1
    m
    • 2
    • 12
  • j

    Jun Yi

    07/02/2025, 8:17 AM
    What is the recommended approach to force a deployment of a specific version (regardless of consumer or provider verification status) when
    can-i-deploy
    fails
    ? I'm exploring the following workaround — is this a valid approach? 1.
    create-version
    2.
    publish-pact
    /
    verify-pact
    3.
    can-i-deploy
    (fails) 4. force deploy anyway (with override flag or manual trigger) 5.
    record-deployment
    Are there any risks or better alternatives to this flow?
    y
    • 2
    • 9
  • k

    Kevin

    07/02/2025, 3:31 PM
    Attempting to use Pact with rust & gRPC. Having trouble when it comes to multiple synchronous messages to the same endpoint but with different request data. The mock server receives a request and responds with the response for a different request message. Example implementation here: https://github.com/MeatballSub/pact-help
    r
    • 2
    • 3
  • k

    Kinkini Gamage

    07/03/2025, 2:24 AM
    Hey, A quick question. Does Pact support GitLab CICD integration? I could find anything related to GitLab CI integration in the documentation as it's all about GitHub.
    m
    • 2
    • 5
  • b

    Bas Dijkstra

    07/07/2025, 12:01 PM
    For those of you looking for a practical, hands-on course on contract testing with Pact, my self-paced, online video course is now complete and available at https://ontestautomation.teachable.com/p/practical-contract-testing-with-pact Course features: _ Dozens of short, to the point instructions videos, with subtitles and transcripts _ Quizzes to test your theoretical knowledge about contract testing _ Hands-on programming exercises to put that knowledge to the test and write and run your own contract tests and make them part of a build pipeline The exercises are available in Java for now. I'll start adding exercises in other languages very soon, starting with C#, then JavaScript / TypeScript. To celebrate the (long overdue) go-live of this course, you can use the coupon code 50PERCENTOFF at checkout for, you guessed it, 50% off the regular price of USD 149. This coupon code is valid until Sunday, July 13, 11:59 PM CEST. (Posted with permission from the Pact team)
    🎉 1
    m
    • 2
    • 1
  • l

    Lachlan Newman

    07/08/2025, 5:35 AM
    Hello. I have a question regarding running provider verification of recently published pacts for different deployments. How can you run provider verification of PACT changes against versions of the provider that have been deployed to other environments? At the moment, we are just running provider verification via a webhook against what's on the latest version of the main branch.
    m
    • 2
    • 5
  • a

    Andrew Marshall

    07/08/2025, 8:39 AM
    Hi all - we have some unit tests using Pact via FFI for contract verification and I'm trying to improve their performance. The Application is in C++ and we run the tests via GTest. We use an updated fork of Pact's C++ client which uses FFI under the hood. Each test does the following - 1. Creates a provider instance 2. Instantiates a custom plugin 3. Performs verification Rust is not my area of expertise, so apologies if this isn't correct but it looks to me like each call to pactffi_using_plugin will block the client thread for at least 0.5s, so each of our unit tests is taking at least that long to complete.
    Copy code
    let result = RUNTIME.block_on(async {
              let result = load_plugin(&dependency).await;
    
              // Add a small delay to let asynchronous tasks to complete
              sleep(Duration::from_millis(500)).await;
    
              result
            });
    I've tried using a fixture to make the plugin and provider instance persistent across multiple tests, but haven't had much luck (it looks like there's some state not being cleaned up between unit test runs - or maybe ths issue is with our plugin?) - the first test passes but subsequent ones fail due to contract verification failures. I can probably provide a minimal example but I thought I'd ask first in case you had any ideas. Many thanks!
    y
    • 2
    • 3