Skip to content

Demo for looking at contract testing to replace service level integration tests.

Notifications You must be signed in to change notification settings

rockettown1/demo.contract_testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick demo looking at Pact contract testing

This is a monorepo so start in the root directory with:

npm i
npm run bootstrap:local

Which will go through all 3 packages installing dependencies

Packages Structure

services
    |- apiA (Fastify server)
    |- apiB (Fastify server)
    |- ui (React app)

Run all three services in parallel using: npm run start:all

And all that happens is the React demo app calls apiA which calls apiB.

Integration points

React app (consumer) - apiA (provider)
apiA (consumer) - apiB (provider)

Todo

  • Create mock server for apiA to test in isolation
  • Add Pact contract for ui and apiA
  • Add Pact contract for apiA and apiB

About

Demo for looking at contract testing to replace service level integration tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published