diff --git a/multi/multi__spring_cloud_contract_stub_runner.html b/multi/multi__spring_cloud_contract_stub_runner.html index f60b2bd4e2..20eebbf459 100644 --- a/multi/multi__spring_cloud_contract_stub_runner.html +++ b/multi/multi__spring_cloud_contract_stub_runner.html @@ -283,6 +283,7 @@ mappings available for the given server:
[]Depending on the provided Stub Runner dependency and the DSL the messaging routes are automatically set up.
Stub Runner comes with a JUnit rule thanks to which you can very easily download and run stubs for given group and artifact id:
@ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer");
After that rule gets executed Stub Runner connects to your Maven repository and for the given list of dependencies tries to:
MessageVerifier interface)Stub Runner uses Eclipse Aether mechanism to download the Maven dependencies. Check their docs for more information.
Since the StubRunnerRule implements the StubFinder it allows you to find the started stubs:
package org.springframework.cloud.contract.stubrunner;
@@ -371,6 +372,7 @@ If you don’t do this then whenever you try to send a message an exception
Authentication details for repositories and profiles are currently not taken into account, so you need to specify it using the properties mentioned above.You can also run your stubs on fixed ports. You can do it in two different ways. One is to pass it in the properties, and the other via fluent API of JUnit rule.
When using the StubRunnerRule you can add a stub to download and then pass the port for the last downloaded stub.
@ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .withPort(12345) .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer:12346");
You can see that for this example the following test is valid:
then(rule.findStubUrl("loanIssuance")).isEqualTo(URI.create("http://localhost:12345").toURL());
diff --git a/single/spring-cloud-contract.html b/single/spring-cloud-contract.html
index b0d7ce6937..f718553730 100644
--- a/single/spring-cloud-contract.html
+++ b/single/spring-cloud-contract.html
@@ -2608,6 +2608,7 @@ mappings available for the given server:[]Depending on the provided Stub Runner dependency and the DSL the messaging routes are automatically set up.
Stub Runner comes with a JUnit rule thanks to which you can very easily download and run stubs for given group and artifact id:
@ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer");
After that rule gets executed Stub Runner connects to your Maven repository and for the given list of dependencies tries to:
MessageVerifier interface)Stub Runner uses Eclipse Aether mechanism to download the Maven dependencies. Check their docs for more information.
Since the StubRunnerRule implements the StubFinder it allows you to find the started stubs:
package org.springframework.cloud.contract.stubrunner;
@@ -2696,6 +2697,7 @@ If you don’t do this then whenever you try to send a message an exception
Authentication details for repositories and profiles are currently not taken into account, so you need to specify it using the properties mentioned above.You can also run your stubs on fixed ports. You can do it in two different ways. One is to pass it in the properties, and the other via fluent API of JUnit rule.
When using the StubRunnerRule you can add a stub to download and then pass the port for the last downloaded stub.
@ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .withPort(12345) .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer:12346");
You can see that for this example the following test is valid:
then(rule.findStubUrl("loanIssuance")).isEqualTo(URI.create("http://localhost:12345").toURL()); diff --git a/spring-cloud-contract.xml b/spring-cloud-contract.xml index cddc394444..8fc309e034 100644 --- a/spring-cloud-contract.xml +++ b/spring-cloud-contract.xml @@ -4,7 +4,7 @@Spring Cloud Contract -2018-10-05 +2018-10-04 @@ -4444,6 +4444,7 @@ mappings available for the given server: Stub Runner comes with a JUnit rule thanks to which you can very easily download and run stubs for given group and artifact id: @ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer"); After that rule gets executed Stub Runner connects to your Maven repository and for the given list of dependencies tries to: @@ -4576,6 +4577,7 @@ JUnit rule.When using the StubRunnerRule you can add a stub to download and then pass the port for the last downloaded stub.@ClassRule public static StubRunnerRule rule = new StubRunnerRule() .repoRoot(repoRoot()) + .stubsMode(StubRunnerProperties.StubsMode.REMOTE) .downloadStub("org.springframework.cloud.contract.verifier.stubs", "loanIssuance") .withPort(12345) .downloadStub("org.springframework.cloud.contract.verifier.stubs:fraudDetectionServer:12346");