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

    Basu Silviu

    02/03/2023, 11:38 AM
    hi guys I try to disable the telemetry by setting the
    PACT_DO_NOT_TRACK
    to true (similar to the way I am setting the
    pact.verifier.publishResults
    to true which works). Unfortunately, I still get at build the message:
    Copy code
    Please note: we are tracking events anonymously to gather important usage statistics like JVM version and operating system. To disable tracking, set the 'pact_do_not_track' system property or environment variable to 'true'.
    which makes me believe it is not working. Is there another way of writing the
    PACT_DO_NOT_TRACK
    (e.g. with dots)? The Surefire looks like:
    Copy code
    <systemProperties>
    	<property>
    	    <name>pact.verifier.publishResults</name>
    	    <value>true</value>
    	</property>
    	<property>
    	    <name>PACT_DO_NOT_TRACK</name>
    	    <value>true</value>
    	</property>
    </systemProperties>
    Thanks,
    y
    • 2
    • 18
  • o

    Ondřej Hájek

    02/06/2023, 10:53 AM
    Hello, I have a question about webhooks, hope this is the best channel. I have successfully setup platinum level of Pact, but I struggle with one thing, that I don’t fully understand. I am using webhook triggered by
    contract requiring verification published
    which works nicely, except for one important scenario: 1. I make a pull request to my consumer, which changes the contract 2. My consumer pact tests pass and publish new pact to the broker 3. The provider verification job gets triggered, by the webhook 4. My can-i-deploy job correctly waits for the verification results and shows that I can’t deploy no sign So far so good… but now I go to fix my provider according to the new contract and when I am done, the updated provider is merged, I want to go back to the PR for consumer and just restart the build and get Yesyes sign from can-I-deploy. This doesn’t work though, because the webhook is not triggered again. I understand, why it’s not triggered and I think I can solve it by using the
    contract published
    event, but I don’t think that’s the best approach, is it? What am I missing? Thanks for any suggestions…
    m
    • 2
    • 2
  • p

    Prashant singh

    02/06/2023, 4:03 PM
    Hi Pact Team, I want to use webhook, triggered by "Contract published with changed content or tags" and push data to Microsoft Teams. Do we have any documentation/example around it? Thanks in advance
    m
    t
    • 3
    • 4
  • g

    Geetika Joshi

    02/08/2023, 6:16 AM
    Hi Pact Team, i am using pact framework and facing a scenario where the response body of the api changes. How can I handle this ? I am using java
    t
    m
    s
    • 4
    • 13
  • j

    Jeroen Lamain

    02/08/2023, 12:02 PM
    Hi, is installing the pact broker (open source) using a prefix path supported or recommended? I have deployed the broker on aws using a name like blbla.aws.com/pact-broker. I can log in and do api calls. However, i have multiple problems using client libries. (1) the jvm @provider annotation does not support a path (I think) (2) using the pact-js libraries I could publish the consumer contract but could not verify as the native verifier could not download the consumer contract. Has anyone deployed the pact broker using a prefix path?
    m
    • 2
    • 3
  • p

    Pallavi Anirban Bose

    02/08/2023, 1:21 PM
    Hi Pact Team, I'm too new to pact. For my .Net application I'm trying to connect to pact broker from Provider test. I keep getting SSL error. Is there anyways I can disable SSL verification?
    m
    • 2
    • 2
  • k

    Kerry McKeever

    02/10/2023, 9:54 PM
    Hey there! Say I have the following scenario: I have a contract test between
    Service A (consumer)
    and
    Service B (provider)
    . However, in this particular test, and for the particular endpoint we're exercising,
    Service B (provider)
    makes an additional call to its own provider,
    Service C
    . My question is: Has anyone encountered this and worked out a solution where you can still run the contract test with
    Service B (provider)
    running in isolation, without the need for
    Service C
    to be running concurrently?
    m
    • 2
    • 3
  • g

    Greg Tyler

    02/13/2023, 8:57 AM
    Hi folks, apologies for the #C5F4KFKR8 post but I wasn’t sure which channel this best fit into. I’m trying to sort out Pact verification inside our Jenkins build. We’re using the Ruby (legacy) verifier and need to output as a JUnit file (hence legacy verifier, since the new native binary doesn’t seem to support JUnit). So I have
    --format RspecJunitFormatter --out /output/junit.xml
    . When I do a verification against multiple consumers, I would hope this would create a single JUnit file of the combined results, but it seems to overwrite the file for each consumer, meaning in the end I only get the last-run consumer’s results. If any other consumers fail, I lose their JUnit output and can’t tell where the failure occurred. This results in failed pipelines without knowing what the error was. Is it possible to either combine multiple consumer-runs into a single JUnit file? Or to output to a dir (
    --out-dir /output
    ) or multiple files (
    --out /outout/junit-{consumer}.xml
    )?
    m
    b
    • 3
    • 4
  • b

    Basu Silviu

    02/14/2023, 8:55 AM
    good morning! can someone please confirm whether the States are case sensitive or not? My pact file contains the following pieces of info:
    Copy code
    "providerStates" -> "name": "My services are up"
    "interactions" -> "description": "Get Customer information Request",
    But in the PactBroker the following string is displayed:
    Copy code
    Get Customer information Request given my services are up
    m
    u
    b
    • 4
    • 11
  • b

    Basu Silviu

    02/14/2023, 8:56 AM
    so the
    interactions
    respect the sensitivity but not the
    states
  • c

    Constantin J.

    02/15/2023, 4:09 PM
    Hey, I was wondering if you think it's a good idea to write e2e with e.g. cucumber-js and use pact in the background to 'mock' the services I'm communicating with. So basically I have my e2e, use the
    .feature
    files to control the 'given' behaviour of pact with the 'given' of cucumber - and in the end I call 'writePact' to get my output The cucumber would execute selenium/puppeteer UI actions 🙂
    m
    t
    • 3
    • 14
  • b

    Bryen

    02/16/2023, 4:54 PM
    Hey all, good evening! I was wondering what the recommended approach would be when using Pactflow between Android/iOS apps and the services they communicate with (and if this is even recommended at all, as it seems quite difficult to find articles/docs on this). Integration tests can ensure that software modules which depend on each other correctly work together, and Pact tests are not supposed to be end-to-end integration tests, sp we shouldn't be writing tests in a
    given we make a request to this endpoint with these query params, we expect this EXACT response
    sort of style, right? Please feel free to correct me if I'm wrong on any of these assumptions, and thanks in advance! 🤗
    m
    n
    • 3
    • 7
  • k

    Kerry McKeever

    02/16/2023, 9:17 PM
    Hey there! I am trying to get my team up to Diamond level, but there is something I'm unclear on. Say I have a new provider and a new consumer, and these two exist in a monorepo. If I am setting up the pipeline for both and adding the
    can-i-deploy
    and
    record-deployment
    for both, then it seems I will come to a stalemate since the pipeline changes would exist for both in the same commit, nothing is merged into the target branch, so there's nothing to verify
    can-i-deploy
    against. I assume I can do this across multiple PRs where I configure the
    consumer test
    ,
    provider test
    ,
    provider verification webhook
    , and
    record-deployment
    , let it deploy to my target branch, then configure
    can-i-deploy
    ? Or is there a preferred method of managing this in a monorepo?
  • y

    Yousaf Nabi (pactflow.io)

    02/20/2023, 10:12 PM
    It’s Pact's 10th birthday today We are proud to be the most loved and adopted multi-protocol and language contract testing tool. it’s made possible by all of our open source contributors and users! Thank you. We look forward to celebrating with you this year, both in person and as part of virtual events. For now, please take a step back in time with this interactive history of Pact, from your very own Developer Advocate and Community Shepherd! https://docs.pact.io/blog/2022/11/17/pact-facts-a-history-lesson
    10 Years of Pact_Loop.mp4
    ❤️ 9
    🎉 7
  • g

    Geetika Joshi

    02/24/2023, 7:19 AM
    Hi Pact Team, i need to use matchers for contract verification. so do i need to include matchers in json file? i am unable to understand where to place the matcher statements like some regular expression etc. i am using java.
    m
    s
    • 3
    • 5
  • a

    Adam Cox

    03/01/2023, 12:37 PM
    Hi Pact Team, We are just starting a project using the pact-cplusplus consumer library. I was looking at the async contract testing but I can’t seem to see the methods in the library. Has this been implemented? Thanks
    y
    • 2
    • 2
  • b

    Basu Silviu

    03/01/2023, 2:03 PM
    Hi everyone - just wondering if anyone used Pact for SIP protocol testing.
    y
    m
    t
    • 4
    • 8
  • c

    Cyrus Devnomad

    03/03/2023, 11:20 AM
    Hi I have a pact consumer unit test that very often and somewhat randomly thows the error "Unable to start mock server". The corresponding error trace would look like this:
    Copy code
    Error Message:
    
       System.InvalidOperationException : Unable to start mock server
    
      Stack Trace:
    
         at PactNet.Drivers.HttpPactDriver.CreateMockServer(String host, Nullable`1 port, Boolean tls)
    
       at PactNet.PactBuilder.StartMockServer()
    
       at PactNet.PactBuilder.VerifyAsync(Func`2 interact)
    
       at MyConsumer.PactConsumer.MyConsumerPactTest.GetUsersByValidParam() in /pact/MyConsumer.PactConsumer/MyConsumerPactTest.cs:line 93
    
       at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
    I'm not sure whether the source of this error is in Pact.NET library or in deeper non .NET pact libraries involved. I have asked this question also in Pact.NET forum with a test project to reproduce the problem: https://pact-foundation.slack.com/archives/C9UTHV2AD/p1676368784117769
  • y

    Yousaf Nabi (pactflow.io)

    03/03/2023, 11:37 AM
    Happy Friday everyone! ralph wave Hear from @Matt (pactflow.io / pact-js / pact-go) as to how Pact is evolving alongside the ever shifting world of API development, empowering our users to contract test existing and emergent protocols and transports. Essential to those operating in multi-protocol landscapes. https://nordicapis.com/plugging-into-the-future-of-api-contract-testing-with-pact/
  • a

    Adam Cox

    03/03/2023, 3:05 PM
    Hello again, Please could someone confirm the following for me? 1. Synchronous message testing is only present in the Pact v4 spec? 2. Pact verifier does not support websockets as a transport by default? We would need to create a plugin for this? Thanks in advance
    ✅ 1
  • s

    Syed Muhammad Dawoud Sheraz Ali

    03/03/2023, 3:59 PM
    Hello. Not sure if this sharing is allowed, let me know if not. I will be speaking at Python Web Conf 2023 (March 13- 17), talk titled “Why you should contract test your Microservices”. This talk will cover the need for contract testing and how pact can help in that (https://2023.pythonwebconf.com/presentations/why-you-should-contract-test-your-microservices). Even though it has been a while since I worked with Pact and Contract testing, my exposure to Pact and the wonders it can bring in integration testing has greatly expanded my technical expertise. I have given a few trainings and provided mentoring to folks within my organization on contract testing already. Really excited for this. https://www.linkedin.com/posts/syed-muhammad-dawoud-sheraz-ali_python-web-conference-[…]405756469248-NkAQ?utm_source=share&amp;utm_medium=member_desktop
    ❤️ 2
    python 1
    💪 2
    👍 1
    t
    y
    m
    • 4
    • 6
  • j

    Jacob Waller

    03/07/2023, 3:16 AM
    Seems like a hilariously catchable bug with a tool like pact:
    😆 4
    t
    m
    y
    • 4
    • 9
  • y

    Yousaf Nabi (pactflow.io)

    03/08/2023, 12:38 PM
    Hey all, The PactFlow team is conducting research on contract testing within an event-driven architecture context. We'd love to hear from you about your event driven architecture testing strategy in your workplace and how contract testing fits in your event driven projects. More specifically, we are looking at integrating tightly with AsyncAPI, to bring you all the great benefits of Pact alongside the benefits that specification-driven workflows can provide. By getting involved, you can help be in the driving seat and shape the future of contract testing We’ve got multiple ways you can get involved, - An easy to fill 5-min survey (open until 27th March) - Schedule a zoom call with PactFlow team - Join our developer preview programme - Vote or comment on our Public Roadmap card We appreciate your time and input! - Shuying & Yousaf from the PactFlow team!
    🙌 1
    t
    m
    • 3
    • 16
  • r

    RetroRocket

    03/13/2023, 12:40 PM
    Hello Pact Team, How can I test My graphql queries with latest pact library for node? I browse through the documentation and I found that for graphql ecamples are either outdated or not documented well. Can someone please point me to a latest example ?
  • b

    Brett Knapik

    03/13/2023, 5:34 PM
    Hello Pact Team, I was wondering if there is any guidance on how to measure contract test coverage? I have stakeholder buy-in on contract testing, however we need a way to measure that contracts are covered and what are not. Our concern comes from the fact the can-i-deploy tool is only as good as the data we give to the pact broker. if we are missing contracts, can-i-deploy will misrepesent that the safety of the deployment. Long term we would like to block PRs if they are missing pacts for new endpoints/consumers. (I apologize if this is the wrong channel for this question, please direct me to the correct one if needed.)
    🦻 1
    t
    m
    • 3
    • 13
  • t

    Thomas K

    03/14/2023, 12:34 PM
    Hello, I have a token eg
    Copy code
    "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJhdWQiOiJodHRwczov" +
        "L2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImV4cCI6MTY0NjMxNjU5NywiaWF0Ij" +
        "oxNjQ2MzEyOTk2LCJzdWIiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJ1aWQiOiI0MTEwMDAzNyJ9.MLpkCQI5bOSmdJuneQdwChEYvXhkaig" +
        "d4ouPOn5f2Rw"
    that needs to match my jwt regex of
    private val jwtRegex = "^[A-Za-z0-9-_=]+\\.[A-Za-z0-9-_=]+\\.?[A-Za-z0-9-_.+/=]*\$"
    most of the time in CI this is fine during pactPublish, but occasionally I get this annoying json parser error like below...
    Copy code
    /usr/lib/ruby/gems/3.0.0/gems/json-2.6.2/lib/json/common.rb:216:in `parse': 859: unexpected token at 'nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImV4cCI6MTY0NjMxNjU5NywiaWF0IjoxNjQ2MzEyOTk2LCJzdWIiOiJhZy1zdGFnaW5nLW1vYmlsZUBhcHBzcG90LmdzZXJ2aWNlYWNjb3VudC5jb20iLCJ1aWQiOiI0MTEwMDAzNyJ9.MLpkCQI5bOSmdJuneQdwChEYvXhkaigd4ouPOn5f2Rw" (JSON::ParserError)
            },
            "headers": {
              "Content-Type": "application/json; charset=UTF-8"
            },
            "matchingRules": {
              "$.body.token": {
                "match": "regex",
                "regex": "^[A-Za-z0-9-_=]+\\\\.[A-Za-z0-9-_=]+\\\\.?[A-Za-z0-9-_.+/=]*$"
              }
            },
            "status": 200
          }
        }
      ],
      "metadata": {
        "pact-jvm": {
          "version": "4.3.5"
        },
        "pactSpecification": {
          "version": "2.0.0"
        }
      },
      "provider": {
        "name": "OtacProviderService"
      }
    }
    '
    it doesn't happen 100% and I've tried countless things to fix it with my variable and my regex etc but it still pops up every so often, can anyone please give some guidance here 🙏 ? im using kotlin so pact-jvm, apologies if wrong channel and then pact cli docker image
  • t

    Thomas K

    03/14/2023, 12:36 PM
    It seems similar to another similar issue I had a while back around the escaped slash ending up being
    \\\\
    every so often when parsed 😕
    m
    • 2
    • 12
  • a

    Adam Cox

    03/14/2023, 2:51 PM
    Hi Pact, We are trying to develop a plugin in rust that enables support WebSockets. Unfortunately it doesn’t look like the example plugins start up a new server so I am struggling a bit. The
    start_mock_server
    function on the Plugin trait does not have a mutable reference to the Plugin struct and so I can’t store a reference to the server. Is there some guidance I can get on how to implement this properly?
    👋 1
    u
    m
    • 3
    • 7
  • s

    Siddharth Gupta

    03/20/2023, 8:19 AM
    Hi Matt , Is there any certification or course after completing which i can become a certified Pact trainer. I am looking to step up my Pact learning further and become a professional trainer.
    m
    b
    • 3
    • 6
  • k

    Kevin Grady

    03/20/2023, 11:22 PM
    Hi Pact, I’m in the process of upgrading an angular app from spec version 2 to version 3 using the migration documentation. Now that mockProvider (PactV3) no longer has access to mockService, where can I access the baseUrl? The migration docs claim:
    Copy code
    the mockService property on the Pact class is no longer an actual MockService, but supports the baseUrl property for compatibility.
    But I am seeing an error that mockService is not a known property of PactV3. What are my options here?
    👋 1
    y
    e
    • 3
    • 14
1...1415161718Latest