Hands-On Guide to Spring Cloud Contract: Creating Consumer-Driven Contracts to Leverage Contract Tests and Improve Your Code

Hands-On Guide to Spring Cloud Contract: Creating Consumer-Driven Contracts to Leverage Contract Tests and Improve Your Code
Hands-On Guide to Spring Cloud Contract: Creating Consumer-Driven Contracts to Leverage Contract Tests and Improve Your Code
English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 9h 44m | 2.74 GB

Developers need confidence when pushing new features to a new application or service in a distributed system. Contract testing is a technique that lets developers catch issues early at application build time. Thanks to such testing, you can apply the fail fast approach and break the build if there’s an issue, all in the hopes of easing continuous delivery and deployment. With the tips in this video, developers can learn to catch issues early, and avoid the need to run heavy and costly integration tests.

This 9+ hour LiveLesson video course teaches developers how to apply the provider and consumer-driven contract testing approaches, for Spring and non-Spring based applications, with Spring Cloud Contract. There is coverage of JVM and non-JVM services, as Spring Cloud Contract can be used in a polyglot environment.

The lessons cover building JVM and non-JVM applications, leveraging contract tests to drive the change of the API, as well as performing the provider and consumer-driven contract tests. In addition, developers learn how to use Spring Cloud Contract to verify whether current testing customs are correct, leverage Spring Cloud Contract Stub Runner to automatically fetch and run stubs, and use Docker to generate and test non-JVM based applications.

What You Will Learn

  • Build JVM and non-JVM applications whose HTTP and messaging communication get tested
  • Leverage contract tests to drive the change of the API
  • Perform the provider and consumer-driven contract tests
  • Perform Contract Tests against polyglot applications
  • Set up advanced features of Spring Cloud Contract
  • Integrate with PACT broker
  • Use Spring Cloud Contract to verify whether your current testing customs are correct
  • Leverage Spring Cloud Contract Stub Runner to automatically fetch and run stubs
  • Use Docker to generate and test non JVM based applications

Who Should Take This Course

  • Front-end developers who want to evolve the back-end API without filing tickets and waiting for them to be processed
  • Back-end developers who want to know who is using their API and how
  • Testers who want to automate and increase the reliability of integration tests
  • Product managers who want to spend less money on end-to-end testing and catch bugs earlier in the process
Table of Contents

01 Hands-On Guide to Spring Cloud Contract – Introduction
02 Learning objectives
03 1.1 Learn how to do unit testing
04 1.2 Learn what Spring Boot is
05 1.3 Test your Spring Boot application
06 1.4 Integration test your application
07 1.5 Use WireMock for integration testing
08 1.6 Test your application with end-to-end tests
09 1.7 See why HTTP mocks can lead to a disaster
10 1.8 Verify why doing messaging can lead to a disaster
11 Learning objectives
12 2.1 Know more about Spring Cloud
13 2.2 Learn the basics of Spring Cloud Contract
14 2.3 Learn what provider contract testing is
15 2.4 Test your application with consumer contract tests
16 2.5 Drive changes of the API with consumer-driven contract testing
17 2.6 Make the HTTP sample fail with contract tests
18 2.7 Make the messaging sample fail with contract tests
19 2.8 Create stubs of projects that you don’t own
20 Learning objectives
21 3.1 Write an HTTP contract in Groovy
22 3.2 Write an HTTP contract in YAML
23 3.3 Create a messaging contract in Groovy
24 3.4 Create a messaging contract in YAML
25 3.5 Define multiple contracts in a single file
26 3.6 Set up regular expressions in a Groovy contract
27 3.7 Set up regular expressions in a contract via matchers section
28 3.8 Execute code on the producer side
29 Learning objectives
30 4.1 Learn the basics of SC-Contract Maven Plugin
31 4.2 Learn the basics of SC-Contract Gradle Plugin
32 4.3 Generate JUnit, JAX-RS and Spock tests
33 4.4 Generate tests for WebFlux applications
34 4.5 Learn the folder structure for contracts
35 4.6 Define base classes with SC-Contract in Maven
36 4.7 Define base classes with SC-Contract in Gradle
37 4.8 Use SC-Contract without Spring MockMvc
38 4.9 Upload stubs to Git
39 4.10 Set up SC-Contract for CI
40 Learning objectives
41 5.1 Leverage Spring REST Docs to test your API
42 5.2 Perform provider contract testing with SC-Contract and Spring REST Docs
43 5.3 Generate Contract DSL from Spring REST Docs
44 5.4 Generate Spring REST Docs snippets from Contract DSL
45 5.5 Test your application with SC-Contract and WireMock
46 Learning objectives
47 6.1 Learn the basics of SC-Contract Stub Runner
48 6.2 Use Stub Runner without Spring via JUnit Rule
49 6.3 Fetch stubs from a remote location
50 6.4 Fetch stubs from classpath
51 6.5 Fetch stubs from local storage
52 6.6 Fetch stubs from Git
53 6.7 Work with random ports in Stub Runner
54 6.8 Leverage stubs per consumer feature to do consumer-driven contract testing
55 6.9 Discover SC-Contract Stub Runner Boot
56 6.10 Connect Stub Runner with a real service discovery
57 6.11 Connect Stub Runner with a real message broker
58 6.12 Debug problems with stubs
59 Learning objectives
60 7.1 Perform provider contract testing with SC-Contract & Maven
61 7.2 Perform provider contract testing with SC-Contract & Gradle
62 7.3 Do consumer-driven contract testing with contracts on the producer side
63 7.4 Do consumer-driven contract testing with contracts in an external repository
64 7.5 Do consumer-driven contract testing with contracts in a Git repository
65 Learning objectives
66 8.1 Learn how to reference request from response
67 8.2 Set up your code to do asynchronous contracts
68 8.3 Work with priorities in contracts
69 8.4 Use stateful stubs – Contracts representing scenarios
70 8.5 Stub out service discovery
71 8.6 Register your own WireMock extension
72 Learning objectives
73 9.1 Learn the basics of SC-Contract messaging implementation
74 9.2 Learn the basics of Spring AMQP
75 9.3 See how SC-Contract integrates with Spring AMQP
76 9.4 Discover Spring Integration
77 9.5 See how SC-Contract integrates with Spring Integration
78 9.6 Learn the basics of Spring Cloud Stream
79 9.7 See how SC-Contract integrates with Spring Cloud Stream
80 9.8 Learn the basics of Apache Camel
81 9.9 See how SC-Contract integrates with Apache Camel
82 Learning objectives
83 10.1 Learn the basics of SC-Contract docker images
84 10.2 Use SC-Contract with NodeJS application as a consumer
85 10.3 Profit from SC-Contract with NodeJS application as a producer
86 10.4 Upload PACT contracts to the broker via SC-Contract
87 10.5 Fetch PACT contracts from the broker via SC-Contract
88 Learning objectives
89 11.1 Create a library with shareable code
90 11.2 Write a custom Contract Converter
91 11.3 Develop a custom Stub Downloader
92 Hands-On Guide to Spring Cloud Contract – Summary