| Modifiers | Name | Description |
|---|---|---|
static class |
ContractVerifierExtension.BaseClassMapping |
|
static class |
ContractVerifierExtension.ContractRepository |
|
static class |
ContractVerifierExtension.Dependency |
| Type | Name and description |
|---|---|
java.lang.Boolean |
assertJsonSizeIncubating feature. |
java.lang.String |
baseClassForTestsClass which all generated tests should extend |
java.util.Map<java.lang.String, java.lang.String> |
baseClassMappingsA way to override any base class mappings. |
java.lang.String |
basePackageForTestsBase package for generated tests |
ContractVerifierExtension.Dependency |
contractDependencyDependency that contains packaged contracts |
ContractVerifierExtension.ContractRepository |
contractRepository |
java.io.File |
contractsDslDirDirectory containing contracts written using the GroovyDSL |
org.springframework.cloud.contract.stubrunner.spring.StubRunnerProperties$StubsMode |
contractsModePicks the mode in which stubs will be found and registered |
java.lang.String |
contractsPathThe path in the JAR with all the contracts where contracts for this particular service lay. |
java.util.Map<java.lang.String, java.lang.String> |
contractsPropertiesMap of properties that can be passed to custom org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder |
boolean |
contractsSnapshotCheckSkipIf 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 |
convertToYamlIf true then will convert contracts to a YAML representation |
boolean |
deleteStubsAfterTestIf set to false will NOT delete stubs from a temporary
folder after running tests |
boolean |
disableStubPublicationIs set to true will not provide the default publication task |
boolean |
excludeBuildFoldersIf set to true then the target or build folders are getting
excluded from any operations. |
java.util.List<java.lang.String> |
excludedFilesPatterns that should not be taken into account for processing |
java.io.File |
generatedTestResourcesDirTest resource directory where tests generated from Groovy DSL should be referenced |
java.io.File |
generatedTestSourcesDirTest source directory where tests generated from Groovy DSL should be placed |
java.util.List<java.lang.String> |
ignoredFilesPatterns for which generated tests should be @Ignored |
java.lang.String[] |
importsImports that should be added to generated tests |
java.util.List<java.lang.String> |
includedFilesPatterns that should be taken into account for processing |
java.lang.String |
nameSuffixForTestsSuffix for generated test classes, like Spec or Test |
java.lang.String |
packageWithBaseClassesA package that contains all the base clases for generated tests. |
java.lang.String |
ruleClassForTestsRule class that should be added to generated tests |
java.lang.String[] |
staticImportsStatic imports that should be added to generated tests |
java.io.File |
stubsOutputDirDir where the generated stubs from Groovy DSL should be placed. |
java.lang.String |
stubsSuffixSuffix for the generated Stubs Jar task |
org.springframework.cloud.contract.verifier.config.TestFramework |
targetFrameworkFor which unit test library tests should be generated |
org.springframework.cloud.contract.verifier.config.TestFramework |
testFrameworkFor which unit test library tests should be generated |
org.springframework.cloud.contract.verifier.config.TestMode |
testModeWhich 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
testFrameworkFor which unit test library tests should be generated
Which mechanism should be used to invoke REST calls during tests