ondiekelijah / tau-pact-node-js-course

Contract testing with Pact course from TAU

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Quality

license

Known Vulnerabilities

PactJS project for the Test Automation University course

A simple Nodejs + Jest project configuring contract tests with PactJS

If you are running your pact broker locally following these instructions then you can run the provider and the publish the way it is, otherwise you will need to modify the pactUrls to the local path and if you are using docker as your pact broker than you need to update the publish script accordingly.

Running via CLI

  • Open your terminal on your project's folder

  • Install Node packages: npm install

  • Run the consumer contract tests (Generate the contracts): npm run test:consumer

  • Run the provider contract tests (Verify the contracts): npm run test:provider

  • Run the provider server http://localhost:8081 (Client API/Service): npm run provider

  • Run the consumer server http://localhost:8080 (Client API/Service): npm run consumer

  • Publish the contracts: npm run publish:contract

About

Contract testing with Pact course from TAU

License:MIT License


Languages

Language:JavaScript 100.0%