This POC is created using a nodejs library called Pact.
Last updated 2 years ago by domain-group-frontend .
ISC · Original npm · Tarball · package.json
$ cnpm install api-tests-template 
SYNC missed versions from official npm registry.

POC for Contract Testing (Pact)

This POC is created using a nodejs library called Pact.


Pact is a contract testing tool. Contract testing is a way to ensure that services (such as an API provider and a client) can communicate with each other. https://docs.pact.io/readme

How to use

Required packages and basic setup is done. There are useful comments included so code should be pretty straight forward.

You're all set to start writing tests :-)

To Run Tests

yarn install to install dependencies

yarn test:consumer to run consumer tests against mock server and generate pact file

yarn publish:pacts to start a docker http server and publish pacts to be accessible to provider

yarn test:provider to run the pact file against the actual server and publish results back to http server

yarn test:e2e to run the all the above steps in one go for end to end worklfow

Test Report

mochawesome reporter is used to capture and present the test results.

Test Report is available in ./mochawesome-report in both json and html format

Current Tags

  • 1.0.10                                ...           latest (2 years ago)

8 Versions

  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 1
Last Month 6
Dependencies (10)
Dev Dependencies (4)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |