Modifiers | Name | Description |
---|---|---|
static class |
ContractVerifierExtension.BaseClassMapping |
|
static class |
ContractVerifierExtension.ContractRepository |
|
static class |
ContractVerifierExtension.Dependency |
Type | Name and description |
---|---|
java.lang.Boolean |
assertJsonSize Incubating feature. |
java.lang.String |
baseClassForTests Class which all generated tests should extend |
java.util.Map<java.lang.String, java.lang.String> |
baseClassMappings A way to override any base class mappings. |
java.lang.String |
basePackageForTests Base package for generated tests |
ContractVerifierExtension.Dependency |
contractDependency Dependency that contains packaged contracts |
ContractVerifierExtension.ContractRepository |
contractRepository |
java.io.File |
contractsDslDir Directory containing contracts written using the GroovyDSL |
org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties$StubsMode |
contractsMode Picks the mode in which stubs will be found and registered |
java.lang.String |
contractsPath The path in the JAR with all the contracts where contracts for this particular service lay. |
java.util.Map<java.lang.String, java.lang.String> |
contractsProperties Map of properties that can be passed to custom org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder |
boolean |
contractsSnapshotCheckSkip If set to true will not assert whether the downloaded stubs / contract
JAR was downloaded from a remote location or a local one(only applicable to Maven repos, not Git or Pact) |
boolean |
convertToYaml If true then will convert contracts to a YAML representation |
boolean |
deleteStubsAfterTest If set to false will NOT delete stubs from a temporary
folder after running tests |
boolean |
disableStubPublication Is set to true will not provide the default publication task |
boolean |
excludeBuildFolders If set to true then the target or build folders are getting
excluded from any operations. |
java.util.List<java.lang.String> |
excludedFiles Patterns that should not be taken into account for processing |
java.io.File |
generatedTestResourcesDir Test resource directory where tests generated from Groovy DSL should be referenced |
java.io.File |
generatedTestSourcesDir Test source directory where tests generated from Groovy DSL should be placed |
java.util.List<java.lang.String> |
ignoredFiles Patterns for which generated tests should be @Ignored |
java.lang.String[] |
imports Imports that should be added to generated tests |
java.util.List<java.lang.String> |
includedFiles Patterns that should be taken into account for processing |
java.lang.String |
nameSuffixForTests Suffix for generated test classes, like Spec or Test |
java.lang.String |
packageWithBaseClasses A package that contains all the base clases for generated tests. |
java.lang.String |
ruleClassForTests Rule class that should be added to generated tests |
java.lang.String[] |
staticImports Static imports that should be added to generated tests |
java.io.File |
stubsOutputDir Dir where the generated stubs from Groovy DSL should be placed. |
java.lang.String |
stubsSuffix Suffix for the generated Stubs Jar task |
org.springframework.cloud.contract.verifier.config.TestFramework |
targetFramework For which unit test library tests should be generated |
org.springframework.cloud.contract.verifier.config.TestFramework |
targetFramework |
org.springframework.cloud.contract.verifier.config.TestFramework |
testFramework For which unit test library tests should be generated |
org.springframework.cloud.contract.verifier.config.TestMode |
testMode Which mechanism should be used to invoke REST calls during tests |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
baseClassMappings(groovy.lang.Closure closure) |
|
void |
contractDependency(groovy.lang.Closure closure) |
|
void |
contractRepository(groovy.lang.Closure closure) |
|
void |
contractsProperties(java.util.Map<java.lang.String, java.lang.String> props) |
|
ContractVerifierExtension |
copy() |
|
void |
disableStubPublication(boolean disableStubPublication) |
|
org.springframework.cloud.contract.verifier.config.TestFramework |
getTargetFramework() |
|
void |
setTargetFramework(org.springframework.cloud.contract.verifier.config.TestFramework targetFramework) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Incubating feature. You can check the size of JSON arrays. If not turned on explicitly will be disabled.
Class which all generated tests should extend
A way to override any base class mappings. The keys are regular expressions on the package name and the values FQN to a base class for that given expression.
Example of a mapping.*.com.example.v1..*
-> com.example.SomeBaseClass
When a contract's package matches the provided regular expression then extending class will be the one
provided in the map - in this case com.example.SomeBaseClass
Base package for generated tests
Dependency that contains packaged contracts
Directory containing contracts written using the GroovyDSL
Picks the mode in which stubs will be found and registered
The path in the JAR with all the contracts where contracts for this particular service lay.
If not provided will be resolved to groupid/artifactid
. Example:
groupid
is com.example
and artifactid
is service
then the resolved path will be
/com/example/artifactid
Map of properties that can be passed to custom org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder
If set to true
will not assert whether the downloaded stubs / contract
JAR was downloaded from a remote location or a local one(only applicable to Maven repos, not Git or Pact)
If true
then will convert contracts to a YAML representation
If set to false
will NOT delete stubs from a temporary
folder after running tests
Is set to true will not provide the default publication task
If set to true then the target
or build
folders are getting
excluded from any operations. This is used out of the box when working with
common repo with contracts.
Patterns that should not be taken into account for processing
Test resource directory where tests generated from Groovy DSL should be referenced
Test source directory where tests generated from Groovy DSL should be placed
Patterns for which generated tests should be
Imports that should be added to generated tests
Patterns that should be taken into account for processing
Suffix for generated test classes, like Spec or Test
A package that contains all the base clases for generated tests. If your contract resides in a location
src/test/resources/contracts/com/example/v1/
and you provide the packageWithBaseClasses
value to com.example.contracts.base
then we will search for a test source file that will
have the package com.example.contracts.base
and name ExampleV1Base
. As you can see
it will take the two last folders to and attach Base
to its name.
Rule class that should be added to generated tests
Static imports that should be added to generated tests
Dir where the generated stubs from Groovy DSL should be placed. You can then mention them in your packaging task to create jar with stubs
Suffix for the generated Stubs Jar task
For which unit test library tests should be generated
testFramework
For which unit test library tests should be generated
Which mechanism should be used to invoke REST calls during tests