https://pact.io logo
Join Slack
Powered by
# pact-jvm
  • r

    Romain Létendart

    01/31/2025, 4:56 PM
    @Romain Létendart has left the channel
  • t

    Tim Vahlbrock

    02/10/2025, 8:01 AM
    Hey there, I'm trying to integrate Pending and WIP Pacts. It seems like if I enable it, I also need to specify provider branch and/or provider tags, even if I don't want to publish the results. I don't get why this additional check is needed. As far as I can tell the branch or the tag is only used when publishing the test results, consequently without pending pacts the provider names are only needed when wanting to publish. I don't get why this shouldn't be the case for pending and WIP Pacts. Having to set this property means I either cannot run Pending and WIP Pacts locally (only in CI) or I need to retrieve the branch name at runtime.
    m
    • 2
    • 3
  • v

    Victor Vargas

    02/10/2025, 9:51 AM
    Hey folks, I have to work on an application that has just Spring and not Spring boot. Is there any handy way to verify the interactions, such as
    Copy code
    @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider.class)
      public void pactVerificationTestTemplate(PactVerificationContext context) {
        context.verifyInteraction();
      }
    If not, what is the recommended way of doing so? Thanks in advance 🤗
  • v

    Victor Vargas

    02/10/2025, 2:53 PM
    Also FYI, if you are using DependencyConvergence plugin there are a bunch of errors of dependency missmatch between Pact packages, i.e.
    Copy code
    [WARNING] Rule 2: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
    Failed while enforcing releasability the error(s) are [
    Dependency convergence error for org.apache.tika:tika-core:2.9.1 paths to dependency are:
    +-com.myproject:1.55.8-SNAPSHOT
      +-au.com.dius.pact.provider:spring:4.6.16
        +-au.com.dius.pact.provider:junit:4.6.16
          +-au.com.dius.pact:provider:4.6.16
            +-au.com.dius.pact.core:matchers:4.6.16
              +-org.apache.tika:tika-core:2.9.1
    and
    +-com.myproject:1.55.8-SNAPSHOT
      +-au.com.dius.pact.provider:spring:4.6.16
        +-au.com.dius.pact.provider:junit:4.6.16
          +-au.com.dius.pact:provider:4.6.16
            +-io.pact.plugin.driver:core:0.5.1
              +-org.apache.tika:tika-core:2.9.2
    and
    +-com.myprojecti:1.55.8-SNAPSHOT
      +-au.com.dius.pact.provider:spring:4.6.16
        +-au.com.dius.pact.provider:junit:4.6.16
          +-au.com.dius.pact.core:model:4.6.16
            +-org.apache.tika:tika-core:2.9.1
  • s

    Spencer

    02/11/2025, 3:34 PM
    @Spencer has left the channel
  • j

    Juan Park

    02/12/2025, 3:25 PM
    Hi folks, I'm using pact-jvm to generate the json contract as the consumer and using pact-go on the provider side to verify it. However, the verification is failing because the json contract generated by pact-jvm includes an auto-generated interaction key which isn't expected nor desired. It looks like pact-ffi removed key generation in 0.4.5. What is the recommendation here? Example:
    Copy code
    "interactions": [
        {
          "description": "List bundles request",
          "interactionMarkup": {
            "markup": [...]
          },
          "key": "5050049c",
          "pending": false,
          [...]
          "metadata": {
            "pact-jvm": {
            "version": "4.6.14"
          },
          "pactSpecification": {
            "version": "4.0"
          },
        }
    m
    r
    r
    • 4
    • 29
  • g

    GitHub

    02/14/2025, 12:56 AM
    Release - 4.6.17 New release published by rholshausen Bugfix Release • b365641 - fix: Only coerce strings to numbers when comparing headers and query parameters • 1b1cf84 - chore(compatibility-suite): Correct the shared steps after updating the compatibility suite • c3938b4 - chore: Fix compatibility-suite CI build • dea8fb7 - chore: Fix compatibility-suite CI build • 8c5b0b1 - fix: Only split values of known multi-value headers #1852 • d7d3030 - fix: Matching rule paths for fields with only digits should not be written as indices #1851 • 5dba442 - fix: Lambda based DSL stringType method did not match the old DSL #1850 • 287b16c - feat: Pass any transport config to the plugin in the test context under the transport_config key • 80d8a87 - chore: Add example of a test with a pending interaction pact-foundation/pact-jvm
  • h

    Haritima Haritima

    02/18/2025, 11:40 AM
    Hey there, I am new to Pact testing and am trying to write consumer side contract testing on our java SpringBoot application for graphql resquests The problem I am facing is that when I run all the tests it fails on some of the test on using static port. I assume it takes time to shutdown the previous mock connection and start new. Using a dynamic port works. I am trying to avoid using dynamic port. I have tried
    Executor.closeIdleConnections();
    with @afterEach tests but that doesnt work. Can someone please help with alternative solution to tear down the connection after each tests (edited)
    m
    • 2
    • 3
  • d

    Denys

    02/18/2025, 3:46 PM
    Hi team! I have a problem THIS IS MY TEST CLASS :
    Copy code
    @ExtendWith(PactConsumerTestExt.class)
    @PactTestFor(providerName = "P01823-TS-Trade-Store", pactVersion = PactSpecVersion.V4, providerType = ProviderType.SYNCH_MESSAGE)
    class GetTradesByFilterProductTypeFXFWDTest {
    
        ManagedChannel channel;
        @BeforeEach
        void setUp(MockServer mockServer) {
            System.setProperty("pact_do_not_track", "true");
    
        }
    
        ////////////////// 1. GetTradesByFilter product types
        @Pact(consumer = "P01819-ipa-mi")
        public V4Pact tradesByFilterProductTypeFXFWD(PactBuilder builder) {
            return builder
                    .usingPlugin("protobuf")
                    .expectsToReceive("a get trade by filter request", "core/interaction/synchronous-message")
                    .with(Map.of(
                            "pact:proto", filePath("proto/tsServiceV2.proto"),
                            "pact:content-type", "application/grpc",
                            "pact:proto-service", "TradeStoreService/GetTradesByFilter",
                            "pact:protobuf-config", Map.of(
                                    "additionalIncludes",
                                    List.of(filePath("proto/tsService.proto"))),
    
                            // Details on the request message
                            "request", Map.of(
                                    "productTypes",
                                    Map.of("value",
                                            "matching(equalTo, 'FXFWD')")),
    
                            // Details on the response
                            "response",
                            Map.of("trade_key",
                                    Map.of("product_type", "matching(equalTo, 'FXFWD')")))
                    ).toPact();
        }
    
    
        @Test
        @PactTestFor(pactMethod = "tradesByFilterProductTypeFXFWD")
        @MockServerConfig(implementation = MockServerImplementation.Plugin, registryEntry = "protobuf/transport/grpc")
        void testTradesByFilterProductTypeFXFWD(MockServer mockServer, V4Interaction.SynchronousMessages interaction) throws InvalidProtocolBufferException, InterruptedException {
            boolean success = false;
            ManagedChannel channel = ManagedChannelBuilder.forTarget("127.0.0.1:" + mockServer.getPort())
                    .usePlaintext()
                    .build();
            try {
                TradeStoreServiceGrpc.TradeStoreServiceBlockingStub stub = TradeStoreServiceGrpc.newBlockingStub(channel);
    
                ts.api.TsServiceV2.TradeFilter tradeFilter = ts.api.TsServiceV2.TradeFilter.parseFrom(interaction.getRequest().getContents().getValue());
    
                Iterator<TsService.Trade> responseTrade = stub.getTradesByFilter(tradeFilter);
    
                assertThat(responseTrade).as("getTradeByFilter is null").isNotNull();
            } finally {
                if (!success) {
                    channel.awaitTermination(10, TimeUnit.SECONDS);
                    channel.shutdown();
                }
            }
        }
        @Pact(consumer = "P01819-ipa-mi")
        public V4Pact tradesByFilterProductTypeFXFWDONE(PactBuilder builder) {
            return builder
                    .usingPlugin("protobuf")
                    .expectsToReceive("a get trade by filter request", "core/interaction/synchronous-message")
                    .with(Map.of(
                            "pact:proto", filePath("proto/tsServiceV2.proto"),
                            "pact:content-type", "application/grpc",
                            "pact:proto-service", "TradeStoreService/GetTradesByFilter",
                            "pact:protobuf-config", Map.of(
                                    "additionalIncludes",
                                    List.of(filePath("proto/tsService.proto"))),
    
                            // Details on the request message
                            "request", Map.of(
                                    "productTypes",
                                    Map.of("value",
                                            "matching(equalTo, 'FXFWD')")),
    
                            // Details on the response
                            "response",
                            Map.of("trade_key",
                                    Map.of("product_type", "matching(equalTo, 'FXFWD')")))
                    ).toPact();
        }
    
    
        @Test
        @PactTestFor(pactMethod = "tradesByFilterProductTypeFXFWDONE")
        @MockServerConfig(implementation = MockServerImplementation.Plugin, registryEntry = "protobuf/transport/grpc")
        void testTradesByFilterProductTypeFXFWDONE(MockServer mockServer, V4Interaction.SynchronousMessages interaction) throws InvalidProtocolBufferException, InterruptedException {
            boolean success = false;
            ManagedChannel channel = ManagedChannelBuilder.forTarget("127.0.0.1:" + mockServer.getPort())
                    .usePlaintext()
                    .build();
            try {
                TradeStoreServiceGrpc.TradeStoreServiceBlockingStub stub = TradeStoreServiceGrpc.newBlockingStub(channel);
    
                ts.api.TsServiceV2.TradeFilter tradeFilter = ts.api.TsServiceV2.TradeFilter.parseFrom(interaction.getRequest().getContents().getValue());
    
                Iterator<TsService.Trade> responseTrade = stub.getTradesByFilter(tradeFilter);
    
                assertThat(responseTrade).as("getTradeByFilter is null").isNotNull();
            } finally {
                if (!success) {
                    channel.awaitTermination(10, TimeUnit.SECONDS);
                    channel.shutdown();
                }
            }
        }
    }
    After running all class I have an error:
    2025-02-18 17:34:46,081 ERROR [main] [:] io.pact.plugins.jvm.core.DefaultPluginManager: Failed to initialise the plugin
    io.grpc.StatusRuntimeException: UNAVAILABLE: io exception at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:351) at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:332) at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:174) at io.pact.plugin.PactPluginGrpc$PactPluginBlockingStub.initPlugin(PactPluginGrpc.java:641) at io.pact.plugins.jvm.core.DefaultPluginManager.initPlugin$lambda$37(PluginManager.kt:913) at io.pact.plugins.jvm.core.DefaultPactPlugin.withGrpcStub(PluginManager.kt:267) at io.pact.plugins.jvm.core.DefaultPluginManager.initPlugin(PluginManager.kt:913) at io.pact.plugins.jvm.core.DefaultPluginManager.tryInitPlugin(PluginManager.kt:892) at io.pact.plugins.jvm.core.DefaultPluginManager.initialisePlugin(PluginManager.kt:866) at io.pact.plugins.jvm.core.DefaultPluginManager.loadPlugin(PluginManager.kt:419) at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin(PactBuilder.kt:113) at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin$default(PactBuilder.kt:110) at au.com.dius.pact.consumer.dsl.PactBuilder.usingPlugin(PactBuilder.kt) at com.ing.ipami.pact.product_type.GetTradesByFilterProductTypeFXFWDTest.tradesByFilterProductTypeFXFWDONE(GetTradesByFilterProductTypeFXFWDTest.java:101) Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: getsockopt: /[00000001]52748 Caused by: java.net.ConnectException: Connection refused: getsockopt Process finished with exit code 0 protobuf plugin V 0.5.4 is installed on my laptop Do you have any ideas why after running tested class PACT framework generated only one tested method inside contract/.json file? Thanks
    m
    • 2
    • 4
  • v

    vicky

    02/19/2025, 12:19 PM
    I am encountering an issue while running my provider tests in a Gradle Kotlin Spring Boot project. I have a contract with 10 test cases, and my provider tests are split across two files—one file covers 2 states, while the other handles 8 states. However, when I run my provider tests, the contract checks for all 10 states in each file instead of only the relevant ones. As a result, I get 10 passing tests but also 10 failing tests because each file is validating all the states, leading to incorrect failures. things i have already tried: 1. moving SpringBootTest to base call 2. https://stackoverflow.com/a/79264442 please help ASAP
    v
    m
    • 3
    • 2
  • h

    Haritima Haritima

    02/19/2025, 5:01 PM
    Hi there, need another help with my pact tests please The provider app(java springboot / Junit) that we have uses very different/ complex steps to initialise the application. The default pact provider verifier is not initialising it correctly and hence it fails while setting up the provider states. Is there a way I can point my pact verifier to already running provider app. (will initialise the provider seperately before executing the pact test)
    m
    • 2
    • 3
  • b

    Bas Dijkstra

    02/24/2025, 7:25 AM
    Quick question, but I can't find the answer in the docs and ChatGPT isn't helpful either: how can I set the Pact verifier output log level to DEBUG in Java? In other languages it's a configuration setting in the code but I can't find the right syntax. Thanks 🙂
    b
    m
    • 3
    • 8
  • s

    Shrinivas Khawase

    02/24/2025, 8:52 AM
    Hello Everyone , We have been trying to implement contract testing for android. We are using this library for it
    au.com.dius.pact.consumer:junit Version 4.6.14
    but we often get the error mentioned below which blocks our pipeline , has anyone else faced this ?Its not consistent but occurs randomly cc @Sitaram Appalla @Ramesh Kumar
    Copy code
    Failed to transform java-semver-0.9.0.jar (com.github.zafarkhaja:java-semver:0.9.0) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
          > Could not find java-semver-0.9.0.jar (com.github.zafarkhaja:java-semver:0.9.0).
            Searched in the following locations:
                <https://jitpack.io/com/github/zafarkhaja/java-semver/0.9.0/java-semver-0.9.0.jar>
    r
    r
    • 3
    • 4
  • o

    Oleksandr Verdiev

    02/24/2025, 9:58 AM
    Hello, could anybody please take a look into this issue? https://github.com/pact-foundation/pact-jvm/issues/1797 Long story short, i want to not hardcode datetime formats, since we are serializing Instant. and instant can have formats like these
    Copy code
    "yyyy-MM-dd'T'HH:mm:ssZ"
    "yyyy-MM-dd'T'HH:mm:ss.SSZ"
    "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
    ...
    "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ"
    I have tried these so far:
    Copy code
    return new PactDslJsonBody()
            .object("Data", looksLike()
                    .uuid("ConsentId")
                    .datetime("CreationDateTime", INSTANT_ISO_DATETIME_FORMAT, Instant.now())
    Copy code
    // "yyyy-MM-dd'T'HH:mm:ss[.[SSSSSSSSS][SSSSSSSS][SSSSSSS][SSSSSS][SSSSS][SSSS][SSS][SS][S]]'Z'";
    // static final String INSTANT_ISO_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSZ";
    // static final String INSTANT_ISO_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss[.SSSSSSSSS]Z";
    static final String INSTANT_ISO_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss(.SSSSSSSSS)?Z";
    r
    • 2
    • 7
  • p

    Paul Sobocinski

    02/24/2025, 7:00 PM
    Hi all! I'm having an issue getting the provided consumer test running against the example client (provided as a reference implementation). Specifically,
    provider.getUrl()
    is returning
    null
    , which in turn causes the test to fail before the
    ConsumerClient
    is even invoked. I have it set up the test and example its own repo here. The full error message I'm getting follows:
    Copy code
    [INFO] -------------------------------------------------------
    [INFO]  T E S T S
    [INFO] -------------------------------------------------------
    [INFO] Running exampleclients.ExampleJavaConsumerPactRuleTest
    Provider URL: null
    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.027 s <<< FAILURE! - in exampleclients.ExampleJavaConsumerPactRuleTest
    [ERROR] runTest(exampleclients.ExampleJavaConsumerPactRuleTest)  Time elapsed: 0.017 s  <<< FAILURE!
    java.lang.AssertionError: Provider URL is null! Aborting test.
            at exampleclients.ExampleJavaConsumerPactRuleTest.runTest(ExampleJavaConsumerPactRuleTest.java:57)
    
    [INFO] 
    [INFO] Results:
    [INFO] 
    [ERROR] Failures: 
    [ERROR]   ExampleJavaConsumerPactRuleTest.runTest:57 Provider URL is null! Aborting test.
    [INFO] 
    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    Versions used:
    JDK 1.8
    ;
    JUnit 4.8.2
    ;
    Pact-JVM 4.1.43
    m
    r
    • 3
    • 5
  • k

    Kusuma Guntamadugu

    02/25/2025, 4:15 AM
    Hi Team, Can I know how I can verify if a particular field has a specific value where this field can be present anywhere in the response (within array/objects). I tried below but the pact file generated fails at provider side
    Copy code
    val pactBody = PactDslJsonBody()
        .stringMatcher("test", "^(test1|test2)$")
    m
    r
    • 3
    • 10
  • p

    Przemyslaw Boszczyk

    03/04/2025, 10:34 AM
    Howdy folks. I'm having issues specifying rather simple pact for one of our consumers. The contract is defining a particular payload schema on POST call, where
    parameters
    field is a Map<String, String> of undefined size and fields.
    Copy code
    {
      "id": "string"
      "parameters": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
    I'm banging my head how to tackle it:
    Copy code
    @Pact(consumer = CONSUMER)
    RequestResponsePact pact(PactDslWithProvider builder) {
        return builder
                .uponReceiving("Post message")
                .path("/api/messages")
                .method("POST")
                .body(newJsonBody(body -> {
                    body.stringType("id", "example_id");
    //                    body.object("parameters", values -> values.eachLike())
                }).build())
                .matchHeader("Content-Type", "application/json.*", "application/json")
                .willRespondWith()
                .status(200)
                .toPact();
    }
    r
    • 2
    • 2
  • m

    Martin Mineo

    03/07/2025, 1:16 PM
    @Martin Mineo has left the channel
  • r

    Ruud Welling

    03/14/2025, 11:10 AM
    Hello, I am trying to implement a Synchronous message pact interaction. Where the consumer uses messaging to send a request message (command) and expects a response message back. The request body uses a field that is a value from the provider state. However when processing the message in the provider, then we do not receive the provider state variable in the message, but the example from the Consumer pact.
    Copy code
    @PactVerifyProvider("A command message")
        public MessageAndMetadata processCommand(MessageContents messageContents) {
            var jsonMessage = messageContents.getContents().valueAsString();
            // this json message does not have the provider state applied
            // instead it contains the example value provided by the consumer...
    
        }
    I tried to look for examples in the pact SDK, but could not really find any. Am I doing this in the right way? Is provider state supported in message pacts?
    • 1
    • 3
  • n

    Neha Munjal

    03/14/2025, 11:47 PM
    Hi Team, We are looking for an option to tag PACT tests with a specific identifier/version. The use case is having a version already promoted to PROD which should use say version x for provider verification and version y for PACTS being written for provider that is still in DEV. How can we specifically tag the PACT file and have the provider select PACTS only corresponding to that version, so that there are no issues running the PACT tests across multiple branches/deployments. Any specific examples for both configuration on consumer side as well as producer side would help.
    m
    • 2
    • 4
  • r

    Ruud Welling

    03/19/2025, 4:36 PM
    Hello. I am trying to create a synchronous message pact consumer test. I have defined the pact context and am working on the corresponding consumer test:
    Copy code
    @Test
        @PactTestFor(pactMethod = "mySyncMessagePact")
        void mySyncMessagePact(V4Interaction.SynchronousMessages interaction) {
          String request = "{}"; // 1: should call a method that produces the request
          // 2: Validate that the request is okay according to the pact
          // 3: Validate that the response message can be handled
        }
    How do I validate that the request message is compliant with the pact that I specified? After looking at the library code I could not find a standard utility that allows me to easily validate this
    r
    • 2
    • 4
  • r

    Ryan Quinn

    03/25/2025, 4:19 AM
    If I have the
    @AllowOverridePactUrl
    annotation set, how do I run that test class as part of my regular pipeline? It works fine when I get a request from a webhook, but I don't know how to create the appropriate URLs when running from my build pipeline. Am I confused about something?
    r
    • 2
    • 2
  • c

    Chandramani Jha

    03/26/2025, 1:22 PM
    Hi Team, Greetings of the day!! I am setting up a Pact contract test for Kafka (MessagePact) and need some guidance. Do we need to spin up a real Kafka instance when writing a consumer contract test? Also, is a Kafka instance required for provider verification? If there are any examples available, please share them. Thanks.
    y
    • 2
    • 15
  • s

    Slackbot

    03/26/2025, 1:22 PM
    https://docs.pact.io/getting_started/how_pact_works#how-to-write-message-pact-tests
  • e

    Erich Zimmerman

    03/27/2025, 3:34 PM
    Greetings! I am validating a reasonable complex JSON return from a service (which I hope to simplify moving forward), but I am running into a matching issue: One of the nested objects has a unique name (not standardized), based on the request. In the below example, "ABCD32" is the name, but in a different call, it may be something else.
    Copy code
    {
      "plans": {
        "ABCD32": {
          "idRequired": true,
          "ids": [
            "1234"
          ]
        }
      }
    }
    I'm trying to use
    object(<name>)
    for this, but the name isn't generally predictable.
    Copy code
    rootResponseObject.object("plans", (plans) ->
        plans.object("??????", (plan) -> {
             ratePlan.booleanType("idRequired", true);
             ratePlan.array("ids", (item) -> item.stringType("12345"));
        })
    );
    I think I'm a bit confused on when we want things to be more general, and when "test by example" is the right way to go. Since I control the request and data, should I just match to that exact string as the result that fulfills the example?
    r
    • 2
    • 3
  • a

    Adrien DEVILLERS

    03/28/2025, 10:41 AM
    Hello everyone, I have a question about provider states it may be a bit general but since we are implementing pact with pact-jvm I post it here. Please let me know if I should post it elsewhere. When we have a provider state on an interaction that is not implemented in the provider verifier, it will fall in the default case. As a result our server doesn't behave as expected and we might not know right away that it comes from our "dummy" provider state. This lead to some painful debugging. I understand it might not be easy to workaround but I wanted to have your take on this ? Thanks in advance
    r
    • 2
    • 4
  • r

    Ruth

    04/08/2025, 9:01 AM
    Hi, I am currently trying to use an Object containing Jodatime as a parameter. unfortunately I then get the error:
    Copy code
    java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$FieldGetter cannot access a member of class org.joda.time.LocalDate with modifiers "private final"
    kotlin.reflect.full.IllegalCallableAccessException: java.lang.IllegalAccessException: class kotlin.reflect.jvm.internal.calls.CallerImpl$FieldGetter cannot access a member of class org.joda.time.LocalDate with modifiers "private final"
    	at kotlin.reflect.jvm.internal.KCallableImpl.call
    Any idea what I can do? Can I use my own serializer, eg. objectMapper?
  • b

    Bas Dijkstra

    04/08/2025, 2:11 PM
    So, I'm trying to wrap my head around branches, especially on the provider side. I used to verify my contracts using
    mvn
    , and because my provider is a Spring service, this works fine:
    mvn clean "-Dpact.verifier.publishResults=true" "-Dpact.provider.version=1.0.0-address-ee07f8c04721b90be743fc1c08946663f01e6e46" test
    However, I now also want to list the provider branch, but when I try this (following the docs):
    mvn clean "-Dpact.verifier.publishResults=true" "-Dpact.provider.version=1.0.0-address-ee07f8c04721b90be743fc1c08946663f01e6e46" "-Dpactbroker.providerBranch=main" test
    It does not record the provider branch. Any ideas? Is this even important? I know I will need it in the next step, when I'll introduce pending pacts...
    r
    • 2
    • 3
  • s

    Shaiju B

    04/21/2025, 4:02 AM
    👋 Hello, team! I am trying to setup a sample PACT project with spring boot. After adding the below dependency for the pact concumer I found that one of the class is missing in dependency Dependency
    Copy code
    <dependency>
        <groupId>au.com.dius.pact.consumer</groupId>
        <artifactId>junit5</artifactId>
        <version>4.3.6</version>
        <scope>test</scope>
    </dependency>
    Class
    Copy code
    @au.com.dius.pact.consumer.junit5.Pact
    Any suggestion on how I could resolve this ?
    j
    • 2
    • 2
  • t

    Truth Opaleye

    04/23/2025, 10:28 PM
    Hello everyone, I'm looking for some clarity on what stringType() and numberType() methods are matching on using them to construct a jsonBody. My provider is verifying the pact generated using this method but it's using the example parameter as the literal value to compare against. For example i see error messages like "1.14) body: $payment.paymentAmount Expected null (Null) to be an integer" when providing something like .object("payment").numberType("paymentAmount").closeObject(). Any ideas?
    m
    • 2
    • 10