GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Contracts on the Producer Side
  • Contracts in an External Repository
  • Spring Cloud Contract with Rest Docs
  • Stubs per Consumer
  • Spring Cloud Contract advanced
  • Stubbing out service discovery
  • Using JUnit Rule
  • Using stubs with Stub Runner Boot

This view

  • Original page
  • New address

GeezerVison is showing spring-cloud-samples.github.io — Spring Cloud Contract 2.4.0 Workshops

Spring Cloud Contract 2.4.0 Workshops

Table of Contents
  • Setup
  • Generating the documentation
  • Resources
    • Adib Saikali’s Introduction to Consumer Driven Contracts
    • Introduction to Spring Cloud Contract
  • Tasks

This documentation takes you through the Spring Cloud Contract Workshops by asking you to complete a series of tasks that teach you both basic and more advanced concepts behind Consumer Driven Contracts in general and Spring Cloud Contract in particular.

Setup

The repository mostly consists of pairs of producer and consumer applications that show different use cases of Spring Cloud Contract. The initial state of the repository is such that all the examples are working and the tests are passing. In order for you to prepare the repository so that it has only the basic pieces of code ready for use, run the following Gradle command:

$ git clone https://github.com/spring-cloud-samples/spring-cloud-contract-samples
$ cd spring-cloud-contract-samples
$ ./gradlew prepareForWorkshops

The preceding commands removes most of the code, contracts, and project setup details, so that you can start the workshops.

Tip
Whenever you're lost, do not worry. At any time, you can check what the contents in the master branch where all of the examples are ready and working.
Important
You must have Maven installed. Check out the website on how to download and install Maven.

Generating the documentation

To generate the documentation, call the Gradle task, as shown below:

$ git clone https://github.com/spring-cloud-samples/spring-cloud-contract-samples
$ cd spring-cloud-contract-samples
$ ./gradlew generateDocumentation

Resources

The following resources may help you learn about Spring Cloud Contracts:

  • Adib Saikali’s Introduction to Consumer Driven Contracts

  • Introduction to Spring Cloud Contract

Adib Saikali’s Introduction to Consumer Driven Contracts

   

   

Introduction to Spring Cloud Contract

Tasks

  • Contracts on the Producer Side

    • Simple DSL examples for HTTP & Messaging

    • Base classes picked by convention

    • Generating documentation from contracts

  • Contracts in an External Repository

    • Simple DSL examples for HTTP & Messaging

    • Base classes picked by mappings

    • Generating documentation from contracts

  • Spring Cloud Contract with Rest Docs

    • Generating stubs using Rest Docs

    • Generating contracts using Rest Docs

    • Reading stubs from classpath via Spring Cloud Contract WireMock

    • Reading stubs from classpath via Stub Runner

  • Extras

    • Stubs per Consumer

    • Spring Cloud Contract advanced

      • Using regular expressions

      • Code execution

      • Referencing request from response

      • Working with stub and test matchers

      • Working with random ports

      • Asynchronous communication

      • Priority

    • Contracts representing scenarios (stateful stubs)

    • Creating a library with common code shareable between teams

      • Requires completion of "Contracts on the producer side"

    • Stubbing out service discovery

    • Using JUnit Rule

      • Requires completion of stubs per consumer"

  • Using stubs with Stub Runner Boot

    • Requires completion of "Spring Cloud Contract advanced"

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.