Integration testing without the limits

Open Source

Test third-party integrations in a controlled environment

Define custom API routes, request/response formats, and timing behaviors to simulate external services. Keep your integration tests reliable, fast, and independent of third-party API availability.

routes.yml
routes:
  - path: /api/users
    rules:
      - method: get
        response:
          status: 200
          body: '[{"name": "John"}]'

Powerful Capabilities

Everything you need for reliable integration testing

🎯

Precise Route Matching

Match requests exactly by HTTP methods, headers, query parameters, and request bodies with full control.

⏱️

Simulate Delays

Add configurable wait times to test slow responses and network timeouts exactly as they happen.

📝

Custom Responses

Return any status code, headers, and response bodies to thoroughly test all scenarios.

🔧

Simple Configuration

Define routes and behaviors in clean YAML files for easy maintenance and team collaboration.

Fast & Isolated

Lightweight Go server runs locally or in CI/CD without external dependencies or delays.

🔄

Full HTTP Support

Support for GET, POST, PUT, PATCH with complete request validation and response control.

Why Use MockThirdParty?

🚫 Avoid API Quota Exhaustion

Run integration tests without counting against your third-party API rate limits. Test as often as you need.

📊 Stable Test Environments

Tests never fail due to third-party service outages or maintenance windows.

💨 Faster Test Execution

No network latency - run tests locally with instant responses or controlled delays.

🎭 Test Edge Cases

Simulate error responses, timeouts, and uncommon scenarios that are hard to reproduce with real APIs.

🔒 CI/CD Integration

Embed in your automated testing pipeline for consistent, repeatable integration tests.

👥 Team Collaboration

Share YAML configurations across teams for consistent testing scenarios.

Simple Configuration, Powerful Results

Define your routes in clean YAML. Point the binary at a single file or a directory of files — the emulator handles request matching, timing, and response formatting automatically.

  • ✅ Intuitive syntax
  • ✅ Single file or directory of files
  • ✅ Version control friendly
routes:
  - path: /v1/test
    rules:
      - method: get
        args:
          - name: author
            value: stephen-king
        response:
          status: 200
          body: '[{"title": "cujo"}]'

  - path: /v1/post
    rules:
      - method: post
        body: '{"username": "test"}'
        wait: 2s
        response:
          status: 200
          body: '{"success": true}'

Get Started in Minutes

Simple installation, immediate results

1

Install

go install gitlab.com/iferminm/thirdparty/cmd/thirdparty@latest

Drops a thirdparty binary in $(go env GOPATH)/bin.

2

Configure Routes

Create routes.yml anywhere:

routes:
  - path: /api/example
    rules:
      - method: get
        response:
          status: 200
          body: '{"message": "Hello World"}'
3

Run

thirdparty --routes routes.yml --port 8080

Pass a directory instead of a file to load every .yml / .yaml inside it. Use --port 0 for a kernel-assigned port.