System Properties
Theses are all the system properties used by Pact-JVM
- Property - the key name of the system property.
- Component - the Pact-JVM component the property is used with.
- Values - the values that can be used for the property.
- List - if the property can have a list of values (comma-separated).
- ENV? - If the property can also be specified using an OS environment variable.
- Up-case ENV? - Can upper case (screaming snake case) form be used for environment variables? (I.e for
a.b.c
you can useA_B_C
environment variable).
Property | Component | Values | List | ENV? | Up-case ENV? | Description |
---|---|---|---|---|---|---|
pact.content_type.override.<contentType> | Matching | json, text, binary, xml | n | n | n | Overrides the handling of a particular content type. Ie., pact.content_type.override.applciation/thrift=json will force applciation/thrift content types to be treated as JSON. You can specify the content type as either type/subtype or type.subtype (e.g., pact.content_type.override.applciation/thrift=json or pact.content_type.override.applciation.thrift=json ). |
pact.matching.xml.validating | Matching (XML) | true, false | n | n | n | When set to false, will disable XML schema validation when matching XML documents. |
pact.matching.xml.namespace-aware | Matching (XML) | true, false | n | n | n | Setting this to true will enable support for XML namespaces with the XML parser. |
pact.mockserver.addCloseHeader | Mock server | true, false | n | n | n | If the mock server should add a Connection: close header to each response. |
pact.writer.overwrite | Pact IO | true, false | n | n | n | Setting this to true will force the Pact file to always be overridden when written. Setting it to false will cause the Pact to be merged with any existing file. |
pact.rootDir | Pact IO | Directory name | n | n | n | Override the directory that Pact files are written to. The default behaviour is to try detect the build tool and set it appropriatly |
pact.generators.packages | Generators | Java package names | y | n | n | Specifies the Java packages to search when looking for generator classes. |
pact.pactbroker.httpclient.usePreemptiveAuthentication | Pact broker | true, false | n | n | n | If set to true, preemptive authentication will be used when accessing the Pact broker. This will send the Authorization header with every request. The default behaviour to to follow the HTTP RFC and only sent credentials after receiving a challenge response. |
pact_do_not_track | Analytics | true, false | n | y | n | If set to true, anonymous OS and JVM version metrics will not be sent to Google Analytics |
pact.expressions.start | Expressions | string value | n | n | n | Sets the string to use to detect the start of an expression. Default is ${ . |
pact.expressions.end | Expressions | string value | n | n | n | Sets the string to use to detect the end of an expression. Default is } . |
pact.consumer.tags | Publishing Pacts (Maven) | string value | y | n | n | Sets the consumer tags to use when publishing the Pact files. |
pact.verifier.ignoreNoConsumers | Verification (Gradle) | true, false | n | n | n | Don't fail the verification task if no consumer Pacts are found to verify. |
pactbroker.url | Verification (JUnit, JUnit 5) | URL | n | y | n | Set the Pact Broker URL to use to fetch pacts from. |
pact broker.host (Deprecated) | Verification (JUnit, JUnit 5) | Hostname | n | y | n | Set the Pact Broker hostname to use to fetch pacts from. Deprecated in favour of pactbroker.url |
pact broker.port (Deprecated) | Verification (JUnit, JUnit 5) | Port number | n | y | n | Set the Pact Broker port to use to fetch pacts from. Deprecated in favour of pactbroker.url |
pact broker.scheme (Deprecated) | Verification (JUnit, JUnit 5) | http, https | n | y | n | Set the Pact Broker scheme to use to fetch pacts from. Deprecated in favour of pactbroker.url |
pactbroker.tags (Deprecated) | Verification (JUnit, JUnit 5) | string values | y | y | n | Tags to use to fetch pacts for. Deprecated in favour of consumer version selectors. |
pactbroker.consumerversionselectors.tags | Verification (JUnit, JUnit 5) | tag names | y | y | n | Tags to use with the selectors when fetching pacts to verify. |
pactbroker.consumerversionselectors.latest | Verification (JUnit, JUnit 5) | true, false | y | y | n | If for each tag to use with the selectors when fetching pacts to verify, should only the latest value be considered. |
pactbroker.consumerversionselectors.rawjson | Verification | JSON | n | y | y | Overrides the consumer version selectors with raw JSON [4.1.29+/4.3.0+] |
pactbroker.consumers | Verification (JUnit, JUnit 5) | consumer names | y | y | n | Consumer names to use with the selectors when fetching pacts to verify. |
pactbroker.auth.username | Verification (JUnit, JUnit 5) | string value | n | y | n | Username to use when fetching pacts to verify. |
pactbroker.auth.password | Verification (JUnit, JUnit 5) | string value | n | y | n | Password to use when fetching pacts to verify. |
pactbroker.auth.token | Verification (JUnit, JUnit 5) | string value | n | y | n | Bearer token to use when fetching pacts to verify. |
pactbroker.enableInsecureTls | Verification (JUnit, JUnit 5) | true, false | n | y | n | Enabling insecure TLS by setting this to true will disable hostname validation and trust all certificates. Use with caution. |
pactbroker.enablePending | Verification (JUnit, JUnit 5) | true, false | n | y | n | If the pending pacts feature should be enabled when fetching pacts to verify. When this is set to true, the provider tags or provider branches property also needs to be set (pactbroker.providerTags or pactbroker.providerBranch). |
pactbroker.providerTags | Verification (JUnit, JUnit 5) | tag names | y | y | n | Provider Tags to use to evaluate pending pacts when fetching pacts to verify. |
pactbroker.providerBranch | Verification (JUnit, JUnit 5) | branch name | y | y | n | Provider Branch to use to evaluate pending pacts when fetching pacts to verify. |
pactbroker.includeWipPactsSince | Verification (JUnit, JUnit 5) | ISO date (YYYY-MM-DD) | n | y | n | The earliest date WIP pacts should be included (ex: YYYY-MM-DD). If no date is provided, WIP pacts will not be included. |
pact.verification.reportDir | Verification (JUnit, JUnit 5) | Directory name | n | y | n | Sets the directory to write any configured verification reports to. |
pactfolder.path | Verification (JUnit, JUnit 5) | Directory name | n | y | n | Directory to fetch pacts from when using the folder loader. |
pact.verification.ignoreIoErrors | Verification (JUnit, JUnit 5) | true, false | n | y | n | When a test is annotated with @IgnoreNoPactsToVerify, any IO errors that occur while fetching the pacts will also be ignored . |
pact.provider.name | Verification (JUnit 5) | string value | n | y | y | Sets the provider name to use when running the Pact verification tests. |
pact.provider.version | Verification | string value | n | n | n | Sets the provider version to use when publishing verification results. |
pact.provider.version.trimSnapshot | Verification | true, false | n | n | n | Enabling this will trim the Maven snapshot suffix off the Provider version. |
pact.provider.tag | Verification | Provider names | y | y | n | List of provider tags to use to tag the verification results with when published back to the Pact Broker. |
pact.provider.branch | Verification | VCS branch name | n | y | n | Branch name for the provider from the version control system to record when publishing verification results. |
pact.filter.description | Verification | string value or regex | n | n | n | Filters the interactions to be verified. |
pact.filter.pacturl | Verification | URL | n | y | n | Overrides the URL to use to fetch the Pacts to verify. This should be used when a webhook from the Pact broker has triggered the build. |
pact.filter.consumers | Verification | string value | y | y | n | Filters the pacts by the consumer names to verify when fetched from older Pact brokers. Replaced with consumer version selectors in newer Pact brokers. |
pact.filter.providerState | Verification | regex or empty string | n | y | n | Filters the interactions by the provider state names to verify. If set, it is a regular expression matched against the provider state names. If set to the empty string, will match interactions with no provider state. |
pact.verifier.enableRedirectHandling | Verification | true, false | n | n | n | If set to false, will disable automatically following redirects. |
pact.verifier.classpathscan.verbose | Verification | true | n | n | n | if set (to any value), will enable verbose logging of class path scanning. Turning this option on can consume a lot of memory and generate a lot of logs. |
pact.verifier.buildUrl | Verification | URL | n | n | n | Sets the build URL to send with the verification results. |
pact.verifier.publishResults | Verification | true, false | n | y | n | If set to true, will publish the results of the verification back to the Pact broker. Should only be enabled in CI. |
pact.showFullDiff | Verification | true, false | n | y | n | If set to true, will add a full diff of the request or response payloads to the verification reports or output. |
pact.showStacktrace | Verification | true, false | n | y | n | If set to true and the verification fails due an exception that is raised, will print the full stack trace of the exception. |
pact.defaultVersion | All | V1, V2, V3, V4 | n | y | y | If not version is specified, Pact framework will default to this version |