Keploy logo
SOAP

Keploy as a SOAP testing framework

Keploy records the SOAP over HTTP exchanges your service has with an upstream service, then replays those envelopes in tests. Your SOAP client runs unchanged and parses a real response on every run, but CI needs no upstream endpoint and no stub to maintain.

Generate SOAP tests free
keploy record -c "<your app start command>"
18.5K+VS Code1.2M+300M+mocks created

What Keploy gives a SOAP team

Every SOAP call your service makes

Keploy records SOAP request and response envelopes as they cross HTTP, so a service that calls a SOAP endpoint can be tested with no access to that endpoint.

  • Envelopes captured verbatim
  • Namespaces preserved
  • SOAP faults captured
  • No upstream access needed
The problem

Why SOAP integration tests slow teams down

The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.

Three ways to do it

Testing SOAP: by hand, with WireMock, or with Keploy

WireMock gives a test a real SOAP endpoint at the cost of running and configuring one. A hand-stubbed client is cheap but never parses an envelope. Keploy replays the recorded exchange with nothing running.

Select any row for the full comparison, with code.

Same coverage, three costs

What you write for SOAP vs what Keploy records

All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.

By hand2–4 hours
order_repository_test.py
hand-written
from unittest.mock import MagicMock
 
 
# A stub SOAP client: every reply is typed out here.
def test_reads_an_order():
client = MagicMock()
client.fetch.return_value = {
"id": "o-1",
"total": 4200,
"status": "NEW",
}
 
order = OrderRepository(client).find("o-1")
 
assert order.total == 4200
# Nothing here parsed an envelope, so a schema or encoding
# change in the real reply cannot fail this test.

A hand-written stub of the SOAP client. No envelope is ever parsed.

WireMock1–2 hours
order_repository_container_test.py
tool-assisted
import pytest
from testcontainers.core.container import DockerContainer
 
 
@pytest.fixture(scope="session")
def client():
# Serves a stubbed SOAP endpoint per suite. Needs a Docker
# available wherever the tests run, including CI.
with DockerContainer("wiremock/wiremock:latest") as c:
c.start()
yield connect(c.get_container_host_ip(), c.get_exposed_port(0))
 
 
def test_reads_an_order(client):
# Schema and seed data are still written by hand.
seed(client, id="o-1", total=4200, status="NEW")
 
order = OrderRepository(client).find("o-1")
 
assert order.total == 4200

WireMock serves a real SOAP endpoint. Fidelity is genuine; the job pays for it in setup.

With Keploy~5 minutes
keploy/test-set-0/test-1.yaml
auto-generated
version: api.keploy.io/v1beta1
kind: Http
name: test-1
spec:
req:
method: POST
url: /orders/o-1/confirm
resp:
status_code: 200
body: '{"id":"o-1","status":"CONFIRMED","total":4200}'
assertions:
noise:
- body.confirmedAt
---
kind: Http
spec:
request:
url: https://api.payments.example.com/v1/charges
response:
body: '{"status":"AUTHORIZED"}'
---
kind: Http
spec:
request:
url: https://api.payments.example.com/v1/payment_intents/tok_123/confirm
response:
body: '{"status":"AUTHORIZED"}'

Recorded from one real request. Nothing here was typed by hand.

Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.

Keploy vs the alternatives

SOAP testing tools, compared

The options a team on service and platform integrations actually reaches for, and where each one genuinely wins. Select a row for the full comparison.

Best in classStrongPartialNot covered

Assessments reflect each tool’s documented behaviour, not benchmark measurements.

How it works

Record your SOAP app once, replay it forever

Keploy sits below your SOAP process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.

Keploy records a GET call to /api/v1/orders/{id} on a SOAP service and captures the dependency calls it makes.

SOAP
Your SOAP app
GET/api/v1/orders/{id}200
RecordingKeploy proxyeBPF · userspace
Outbound HTTP
Outbound HTTPEvery outbound HTTP call
+2 more SOAP dependencies
An example shape of a captured call. Your own endpoints and dependencies come from your real traffic, so nothing here has to be written by hand.
Mock coverage

What Keploy mocks for SOAP, with zero config

5 of the 6 dependencies a typical SOAP service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.

Quick start

Your first SOAP test suite in under five minutes

Every command below runs against your existing SOAP service. Nothing in your source tree changes.

  1. 1Install the Keploy CLI

    A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.

    curl -sSL https://keploy.io/install.sh | bash
  2. 2Record your service

    Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.

    keploy record -c "<your app start command>"
  3. 3Exercise the paths you care about

    Use curl, your frontend, or an existing smoke script. Every request becomes a test case with its SOAP calls captured alongside it.

    curl -X POST localhost:8080/orders/o-1/confirm
    curl localhost:8080/orders/o-1
  4. 4Replay in CI

    Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.

    keploy test -c "<your app start command>" --delay 10

Ready to try it on your own SOAP service?

Ecosystem

Works with the rest of your SOAP stack

Keploy records at the network layer, so framework and driver choices inside your SOAP app do not change how it captures traffic.

FAQ

SOAP testing with Keploy: common questions

Join our GlobalCommunity

Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.

1.2M+Installs
18.5K+GitHub
100K+Devs
300M+Mocks
1K+Contributors
#1OSS Trending
4.9★★★★★from 500+ reviews onG2GartnerVS CodeChrome
★★★★★

“Best report of integration and API tests I've seen — which we don't get from RestAssured.”

G2
★★★★★

“Future of microservices testing. I don't write tests now!”

Mahfooz A. · G2 · 5/5
★★★★★

“An amazing product that simplifies the automation.”

Gartner · 4.0
XGitHubSlackYouTubeLinkedIn
Built by developers, for developers.Let's build the future, together.