=== Stub Runner Boot
Spring Cloud Contract Verifier Stub Runner Boot is a Spring Boot application that exposes REST endpoints to
trigger the messaging labels and to access started WireMock servers.
One of the usecases is to run some smoke (end to end) tests on a deployed application. You can read
more about this in the http://toomuchcoding.com/blog/2015/09/27/microservice-deployment/["Microservice Deployment" article at Too Much Coding blog.]
==== How to use it?
Just add the
[source,groovy,indent=0]
----
compile "org.springframework.cloud.contract:stub-runner-boot:${verifierVersion}"
----
and a messaging implementation:
[source,groovy,indent=0]
----
// for Apache Camel
compile "org.springframework.cloud.contract:spring-cloud-contract-stub-runner-camel:${verifierVersion}"
// for Spring Integration
compile "org.springframework.cloud.contract:spring-cloud-contract-stub-runner-integration:${verifierVersion}"
// for Spring Cloud Stream
compile "org.springframework.cloud.contract:spring-cloud-contract-stub-runner-stream:${verifierVersion}"
----
Build a fat-jar and you're ready to go!
For the properties check the *Stub Runner Spring* section.
==== Endpoints
===== HTTP
- GET `/stubs` - returns a list of all running stubs in `ivy:integer` notation
- GET `/stubs/{ivy}` - returns a port for the given `ivy` notation (when calling the endpoint `ivy` can also be `artifactId` only)
===== Messaging
For Messaging
- GET `/triggers` - returns a list of all running labels in `ivy : [ label1, label2 ...]` notation
- POST `/triggers/{label}` - executes a trigger with `label`
- POST `/triggers/{ivy}/{label}` - executes a trigger with `label` for the given `ivy` notation (when calling the endpoint `ivy` can also be `artifactId` only)
==== Example
[source,groovy,indent=0]
----
include::src/test/groovy/org/springframework/cloud/contract/stubrunner/boot/StubRunnerBootSpec.groovy[tags=boot_usage]
----