Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.52 KB

README.md

File metadata and controls

40 lines (25 loc) · 1.52 KB

Pact Mock Service

This codebase provides the mock service used by implementations of Pact. It is packaged as a gem, and as a standalone executable for Mac OSX and Linux (Windows coming soon.)

The mock service provides the following endpoints:

  • DELETE /interactions - clear previously mocked interactions
  • POST /interactions - set up an expected interaction
  • GET /interactions/verification - determine whether the expected interactions have taken place
  • POST /pact - write the pact file

As the Pact mock service can be used as a standalone executable and administered via HTTP, it can be used for testing with any language. All that is required is a library in the native language to create the HTTP calls listed above.

Usage

With Ruby

$ gem install pact-mock_service
$ pact-mock-service --port 1234

Run pact-mock-service help for command line options.

Mac OSX and Linux, without Ruby

See the releases page for the latest standalone executable.

Windows, without Ruby

I had a package somewhere lying around, but I lost it. Raise an issue if you need it, and I'll give you the instructions to rebuild it (I don't have a Windows machine).

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request