Recall & Review
beginner
What is contract testing in REST APIs?
Contract testing is a way to check that two parts of a system, like a client and a server, agree on how they communicate. It makes sure the API responses and requests match what both expect.
Click to reveal answer
beginner
Why is contract testing important for REST APIs?
It helps catch problems early by verifying that changes in the API or client do not break their communication. This keeps apps working smoothly without surprises.
Click to reveal answer
intermediate
What are the two main types of contract testing?
The two main types are consumer-driven and provider-driven. Consumer-driven means the client defines what it needs. Provider-driven means the server defines what it offers.
Click to reveal answer
intermediate
How does a contract test differ from an end-to-end test?
Contract tests focus only on the agreement between client and server, checking request and response formats. End-to-end tests check the whole system working together, including UI and databases.
Click to reveal answer
beginner
Name a popular tool used for contract testing REST APIs.
One popular tool is Pact. It helps create and verify contracts between API clients and servers easily.
Click to reveal answer
What does contract testing primarily verify in REST APIs?
✗ Incorrect
Contract testing checks that the client and server agree on how data is sent and received.
Which type of contract testing is driven by the client’s needs?
✗ Incorrect
Consumer-driven contract testing means the client defines the contract requirements.
Which tool is commonly used for contract testing REST APIs?
✗ Incorrect
Pact is a popular contract testing tool for APIs.
Contract testing helps prevent which of the following?
✗ Incorrect
Contract testing ensures changes do not break the communication contract.
How is contract testing different from end-to-end testing?
✗ Incorrect
Contract testing focuses on client-server agreements, while end-to-end tests cover the entire workflow.
Explain what contract testing is and why it is useful in REST API development.
Think about how two friends agree on how to talk to each other.
You got /3 concepts.
Describe the difference between consumer-driven and provider-driven contract testing.
Who decides the rules: the client or the server?
You got /3 concepts.