CONSUMER-DRIVEN
Contract Testing
PRAVITHA NAIR/SUNITA VENKATACHALAM
TARGET, BANGALORE
PROBLEM
STATEMENTS
1. How can something be added to a
service without breaking the clients?
2. How can something be removed
from a service without breaking the
clients?
3. How can a service developer find out
how clients are using their service?
4. How to enable short release cycles
and continuous delivery of services?
Provider
Consumer
BasicFlowof a
Consumer
DrivenContract
CONSUMER
generates a Consumer
Driven Contract
PROVIDER works with
CONSUMER who re-
generates contract and code
PROVIDER changes code
that results in change in
contract ; contract breaks
CONSUMER shares
the generated contract
with the PROVIDER
PROVIDER includes
the Contract
Verification as part of
their unit test
PACT.io
Pact.io is a testing
framework that
evaluates CONSUMER
Contracts are satisfied
all through
development cycle of a
PROVIDER
PACT- DEMO
WhyPACT?
 Confidence
 Continuously evolve your codebase
knowing that Pact will guarantee
Contracts are met.
 Faster
 No need to wait for integration testing in
end-to-end environments. No need for
manual testing.
 Less Error Prone
 Generation and verification of Contracts
are automatically managed by Pact.
Questions?

Consumer-Driven Contract Testing PACT

  • 1.
  • 2.
    PROBLEM STATEMENTS 1. How cansomething be added to a service without breaking the clients? 2. How can something be removed from a service without breaking the clients? 3. How can a service developer find out how clients are using their service? 4. How to enable short release cycles and continuous delivery of services?
  • 3.
  • 4.
  • 5.
    BasicFlowof a Consumer DrivenContract CONSUMER generates aConsumer Driven Contract PROVIDER works with CONSUMER who re- generates contract and code PROVIDER changes code that results in change in contract ; contract breaks CONSUMER shares the generated contract with the PROVIDER PROVIDER includes the Contract Verification as part of their unit test
  • 6.
    PACT.io Pact.io is atesting framework that evaluates CONSUMER Contracts are satisfied all through development cycle of a PROVIDER
  • 7.
  • 8.
    WhyPACT?  Confidence  Continuouslyevolve your codebase knowing that Pact will guarantee Contracts are met.  Faster  No need to wait for integration testing in end-to-end environments. No need for manual testing.  Less Error Prone  Generation and verification of Contracts are automatically managed by Pact.
  • 9.