From efcc2b73fa70cbb7fbc7747f0918bab1db2920ea Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Sat, 26 Mar 2016 16:53:40 +0100 Subject: [PATCH] Updated stub-runner docs --- stub-runner/stub-runner-junit/README.md | 2 +- stub-runner/stub-runner/README.md | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/stub-runner/stub-runner-junit/README.md b/stub-runner/stub-runner-junit/README.md index 32c824c182..761c3f431f 100644 --- a/stub-runner/stub-runner-junit/README.md +++ b/stub-runner/stub-runner-junit/README.md @@ -23,7 +23,7 @@ class AccurestRuleSpec extends Specification { } ``` -You can set the default value of the Maven repository by means of system property: +You can set the default value of the Maven repository by means of a system property: ``` -Dstubrunner.stubs.repository.root=http://your.maven.repo.com diff --git a/stub-runner/stub-runner/README.md b/stub-runner/stub-runner/README.md index c52bdf7b9e..78a8ce5829 100644 --- a/stub-runner/stub-runner/README.md +++ b/stub-runner/stub-runner/README.md @@ -44,22 +44,13 @@ You can configure the stub runner by either passing the full arguments list with or each parameter separately with a `-P` prefix and without the hyphen `-` in the name of the param ``` -./gradlew stub-runner-root:stub-runner:run -Pc=pl -Pminp=10000 -Pmaxp=10005 -``` - -### Defining collaborators' stubs - -You can define global stubs under folder corresponding to groupid/artifactid of your collaborator - -``` -com/ofg/foo +./gradlew stub-runner-root:stub-runner:run -Pc=pl -Pminp=10000 -Pmaxp=10005 -Ps=a:b:c,d:e,f:g:h ``` By default stub definitions are stored in `mappings` directory inside stub repository. -#### Stubbing collaborators +#### Stubs -For each collaborator defined in project metadata all collaborator mappings (stubs) available in repository are loaded. Stubs are defined in JSON documents, whose syntax is defined in [WireMock documentation](http://wiremock.org/stubbing.html) Example: @@ -79,9 +70,7 @@ Example: } ``` -Stub definitions are stored in stub repository under the same path as collaborator fully qualified name. -Paths (as long it's inside the directory mentioned above) and names of documents containing stub definitions not play any -other role than describing stubs' role / purpose. +In the provided JAR file we're harvesting all JSON files and try to put them inside running WireMock instance. #### Viewing registered mappings