# Pact Ref Mock Server

Pact Ref Mock Server is a self-hosted development app. Pact Reference Mock Server is a tool that acts as a stand-in for a real web service during software testing. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/6087/pact-ref-mock-server

## Description

Pact Reference Mock Server is a tool that acts as a stand-in for a real web service during software testing. It allows developers to check that different parts of a system communicate correctly without needing the entire network to be active, ensuring reliable and efficient performance.

## Platform availability

Available on 0 of 10 platforms.

## Links

- Docker Hub: https://hub.docker.com/r/pactfoundation/pact-ref-mock-server

## Common questions

### What should I check if the pact-mock-server command does not start?

Download the binary that matches your machine's architecture, extract it, and run --help to confirm it runs. If the file is for the wrong CPU type or is missing, the command will not start.

### How can I control the lifecycle of a running Pact mock server?

The lifecycle can be controlled by the RESTful web API or through the command line interface. It implements the V4 Pact specification.

### What extra component is needed for CSV test data?

Install the CSV plugin before starting the mock server if your tests use CSV data. Without it, Pact may not know how to match CSV payloads and tests may fail.

### Why can a proxy configuration cause Pact mock server checks to fail?

Pact attempts to ensure the mock service can be communicated with before tests run. It does this via an HTTP call that will be sent through any intermediate proxies if configured.

### Why does the mock server not run when PactProviderRule is present?

The mock server may not run because Pact fragments are not generated properly. Make the createFragment method public so fragments are generated correctly.

---
Source: Our Local Host (https://ourlocalhost.com/app/6087/pact-ref-mock-server), the self-hosted and open-source app directory.
