diff --git a/2.0.x/multi/multi__contract_dsl.html b/2.0.x/multi/multi__contract_dsl.html index 24bbe04901..0aa111e8e8 100644 --- a/2.0.x/multi/multi__contract_dsl.html +++ b/2.0.x/multi/multi__contract_dsl.html @@ -98,7 +98,7 @@ response: regex: bar - key: foo3 command: andMeToo($it)
![]() | Tip |
|---|---|
You can compile contracts to stubs mapping using standalone maven command:
- |
![]() | Warning |
|---|---|
Spring Cloud Contract Verifier does not properly support XML. Please use JSON or
+ |
![]() | Warning |
|---|---|
Spring Cloud Contract Verifier does not properly support XML. Please use JSON or help us implement this feature. |
![]() | Warning | ||||||||
|---|---|---|---|---|---|---|---|---|---|
The support for verifying the size of JSON arrays is experimental. If you want
to turn it on, please set the value of the following system property to └──
│ └── contract2.groovy
└── mappings
└── mapping.jsonBy maintaining this structure classpath gets scanned and you can profit from the messaging / -HTTP stubs without the need to download artifacts.
You can set the following options to the main class: -c, --classifier Suffix for the jar containing stubs (e. g. 'stubs' if the stub jar would have a 'stubs' classifier for stubs: foobar-stubs ). Defaults to 'stubs' @@ -383,7 +379,6 @@ its methods as presented below:@AutoConfigureStubRunner(mappingsOutputFolder = "target/outputmappings/") -@DirtiesContext @ActiveProfiles("test") class StubRunnerConfigurationSpec extends Specification { @@ -685,7 +680,6 @@ Or set the test as follows:-@DirtiesContext class StubRunnerStubsPerConsumerSpec extends Specification { ... } This brief tour walks through using Spring Cloud Contract: You can find an even more brief tour @@ -230,7 +229,6 @@ the collaborators' stubs for you, as shown in the following example: @SpringBootTest(webEnvironment=WebEnvironment.NONE) @AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"}, stubsMode = StubRunnerProperties.StubsMode.LOCAL) -@DirtiesContext public class LoanApplicationServiceTests {
In your integration test, you can receive stubbed versions of HTTP responses or messages that are expected to be emitted by the collaborator service. You can see entries similar @@ -363,7 +361,6 @@ You would like to feed that instance with a proper stub definition. At som @SpringBootTest(webEnvironment=WebEnvironment.NONE) @AutoConfigureStubRunner(ids = {"com.example:http-server-dsl:+:stubs:6565"}, stubsMode = StubRunnerProperties.StubsMode.LOCAL) -@DirtiesContext public class LoanApplicationServiceTests { After that, during the tests, Spring Cloud Contract automatically finds the stubs (simulating the real service) in the Maven repository and exposes them on a configured (or random) port. Since you are developing your stub, you need to be sure that it actually resembles your
@@ -660,7 +657,6 @@ can also provide the offline work switch ( Now, when you run your tests, you see something like this: Either via environment variables, system properties, properties set inside the plugin or contracts repository configuration you can tweak the downloader’s behaviour. Below you can find the list of -properties Table 10.1. SCM Stub Downloader properties |