2 How contract testing fits into wider testing concepts

 

This chapter covers

  • Contract testing and other testing types
  • Whether contract testing can replace other types of tests
  • Benefits of contract testing
  • Introducing contract testing to your teams
  • Challenges with contract testing
  • Practical guidance on introducing contract testing to projects

Contract testing is unique when compared to other testing types because it requires developing two sets of tests to fully reap the benefits. A consumer test can exist without a provider test, but it won’t be useful. You can initiate the contract testing process by writing either a consumer test or a provider test individually, but it’s important to note that these individual tests alone don’t give you real benefits. To unlock the full potential of contract testing, you must implement and execute both consumer and provider tests in tandem, in a continuous integration (CI) pipeline ideally.

2.1 Contract testing and other testing types

 
 
 
 

2.1.1 Unit testing

 
 
 

2.1.2 Integration testing

 
 

2.1.3 End-to-end testing

 
 
 
 

2.1.4 The ice cream cone of test automation

 
 

2.1.5 Contract testing in the test automation pyramid

 
 
 

2.2 Does contract testing replace other types of tests?

 
 

2.3 Benefits of contract testing

 
 

2.3.1 Cost saving benefits

 
 
 

2.3.2 Quality benefits

 
 

2.3.3 Team benefits

 
 
 
 

2.4 Introducing contract testing to your teams

 
 

2.4.1 Start with Why

 
 

2.4.2 Start small and incrementally

 
 
 

2.4.3 Communicate benefits and progress visibly

 
 

2.4.4 Find allies or champions

 
 
 

2.5 Challenges with contract testing

 
 

2.5.1 Contract testing takes time

 
 
 

2.5.2 Contract testing requires a mindset shift

 
 

2.5.3 Lack of buy-in

 
 

2.5.4 More technical than other testing activities

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest