Annotation Type PactBroker


  • @Retention(RUNTIME)
    @Target(TYPE)
    @Inherited
    public @interface PactBroker
    Used to point Pact runner to source of pacts for contract tests Default values can be set by setting the `pactbroker.*` system properties
    See Also:
    pact loader
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      PactBrokerAuth authentication
      Authentication to use with the pact broker, by default no authentication is used
      java.lang.String[] consumers
      Deprecated.
      VersionSelector[] consumerVersionSelectors
      Consumer version selectors to fetch pacts for, defaults to latest version If you set the version selector tags or latest fields through system properties, separate values by commas
      java.lang.String enableInsecureTls
      Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates.
      java.lang.String enablePendingPacts
      If the pending pacts feature should be enabled.
      java.lang.String host
      Deprecated.
      Use url instead
      java.lang.String includeWipPactsSince
      The earliest date WIP pacts should be included (ex: YYYY-MM-DD).
      java.lang.String port
      Deprecated.
      Use url instead
      java.lang.String providerBranch
      Provider Branches to use to evaluate pending pacts
      java.lang.String[] providerTags
      Provider Tags to use to evaluate pending pacts
      java.lang.String scheme
      Deprecated.
      Use url instead
      java.lang.String[] tags
      Deprecated.
      java.lang.String url  
      java.lang.Class<? extends au.com.dius.pact.core.support.expressions.ValueResolver> valueResolver
      Override the default value resolver for resolving the values in the expressions
    • Element Detail

      • url

        java.lang.String url
        Returns:
        URL of pact broker
        Default:
        "${pactbroker.url:}"
      • host

        @Deprecated
        java.lang.String host
        Deprecated.
        Use url instead
        Returns:
        host of pact broker
        Default:
        "${pactbroker.host:}"
      • port

        @Deprecated
        java.lang.String port
        Deprecated.
        Use url instead
        Returns:
        port of pact broker
        Default:
        "${pactbroker.port:}"
      • scheme

        @Deprecated
        java.lang.String scheme
        Deprecated.
        Use url instead
        HTTP scheme, defaults to HTTP
        Default:
        "${pactbroker.scheme:http}"
      • tags

        @Deprecated
        java.lang.String[] tags
        Deprecated.
        Tags to use to fetch pacts for, defaults to `latest` If you set the tags through the `pactbroker.tags` system property, separate the tags by commas
        Default:
        {"${pactbroker.tags:}"}
      • consumerVersionSelectors

        VersionSelector[] consumerVersionSelectors
        Consumer version selectors to fetch pacts for, defaults to latest version If you set the version selector tags or latest fields through system properties, separate values by commas
        Default:
        {@au.com.dius.pact.provider.junitsupport.loader.VersionSelector(tag="${pactbroker.consumerversionselectors.tags:}", latest="${pactbroker.consumerversionselectors.latest:}", consumer="${pactbroker.consumers:}")}
      • consumers

        @Deprecated
        java.lang.String[] consumers
        Deprecated.
        Consumers to fetch pacts for, defaults to all consumers If you set the consumers through the `pactbroker.consumers` system property, separate the consumers by commas
        Default:
        {"${pactbroker.consumers:}"}
      • authentication

        PactBrokerAuth authentication
        Authentication to use with the pact broker, by default no authentication is used
        Default:
        @au.com.dius.pact.provider.junitsupport.loader.PactBrokerAuth(username="${pactbroker.auth.username:}", password="${pactbroker.auth.password:}", token="${pactbroker.auth.token:}")
      • valueResolver

        java.lang.Class<? extends au.com.dius.pact.core.support.expressions.ValueResolver> valueResolver
        Override the default value resolver for resolving the values in the expressions
        Default:
        au.com.dius.pact.core.support.expressions.SystemPropertyResolver.class
      • enablePendingPacts

        java.lang.String enablePendingPacts
        If the pending pacts feature should be enabled. This can be set with the pactbroker.enablePending JVM system property. When this is set to true, the provider tags property also needs to be set
        Default:
        "${pactbroker.enablePending:false}"
      • providerTags

        java.lang.String[] providerTags
        Provider Tags to use to evaluate pending pacts
        Default:
        {"${pactbroker.providerTags:}"}
      • providerBranch

        java.lang.String providerBranch
        Provider Branches to use to evaluate pending pacts
        Default:
        "${pactbroker.providerBranch:}"
      • includeWipPactsSince

        java.lang.String includeWipPactsSince
        The earliest date WIP pacts should be included (ex: YYYY-MM-DD). If no date is provided, WIP pacts will not be included.
        Default:
        "${pactbroker.includeWipPactsSince:}"
      • enableInsecureTls

        java.lang.String enableInsecureTls
        Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates. Use with caution. This can be set with the pactbroker.enableInsecureTls JVM system property.
        Default:
        "${pactbroker.enableInsecureTls:false}"