Contract testing is all about testing the contract between the consumer and producer services. Consider the following diagram showing contract testing:
As you can see in this diagram, each consumer has a particular contract with the producer. This contract is about the expected structure of input and output data between the producer and consumer services. Each consumer service has a different contract with the producer service, as per as its requirements. If services change over time, then contracts between the services must be satisfied.
Contract testing tests the input and output of service calls that contain certain attributes and also tests throughput latency. Contract testing is not a component test; it doesn't test the component deeply, but rather, it only tests the data structure with the required attributes for the input and output of service calls...