From the course: Software Testing Tips Weekly

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Contract testing

Contract testing

From the course: Software Testing Tips Weekly

Start my 1-month free trial

Contract testing

- [Instructor] When performing API testing it's expected to test the outcome of a request. For example, if I'm sending a post request to an end point, then I'm going to be creating something new on the application. Sending a valid post request to that end point will result in a new item being created. This is a functional API test. It focuses mainly on the outcome of that test, rather than the interaction between the two services involved. Contact testing looks deeper at this. It's a methodology for ensuring that two separate systems like microservices are compatible with each other. It captures the interactions that are exchanged between each service, storing them as a contract which can then be used to verify the both parties are adhering to it. Contract tests focus on the messages that flow between a consumer and a provider. While functional tests also ensure that the correct side effects have occurred. In the example…

Contents