soaptest
Make SOAP services testable from pytest. Point it at a WSDL, get callable Python.
30-second example
pip install soaptest
from soaptest import Client
client = Client.from_wsdl(
"http://www.dataaccess.com/webservicesserver/NumberConversion.wso?WSDL"
)
# Discover what's available
print(client.describe())
# NumberConversionSoap @ http://www.dataaccess.com/webservicesserver/NumberConversion.wso
# NumberToWords(ubiNum: nonNegativeInteger) -> string
# NumberToDollars(dNum: decimal) -> string
# Call any operation by name
result = client.NumberToWords(ubiNum=42)
print(result) # "forty two "
Why
SOAP testing today means SoapUI (a 200 MB GUI) or hand-rolling requests with raw XML.
Neither fits naturally into a pytest suite.
soaptest is a thin Pythonic layer on top of zeep.
It gives you WSDL discovery (describe()) and operation dispatch (client.OpName(**kwargs))
with zero boilerplate. You write plain pytest test functions; soaptest handles the SOAP.
What it does not do yet: record/replay of responses, fault translation into typed Python exceptions, type stubs for operations, or a pytest fixture plugin. Those are on the Roadmap. v0.1 is intentionally minimal — get the basics right first.
Installation
pip install soaptest
Python 3.9+ is required. zeep, lxml, and httpx are installed automatically.
Usage
Discover operations
from soaptest import Client
client = Client.from_wsdl("https://yourservice.example.com/service?WSDL")
print(client.describe()) # pretty-printed operation list
ops = client.operations # list of Operation named-tuples
Each Operation has: name, input_signature, output_signature, service, port, port_url.
Call an operation
result = client.SomeOperation(param1="value", param2=123)
__getattr__ dispatches to the underlying zeep service. The return value is whatever
zeep returns (usually a zeep.objects.* object or a plain Python scalar). No conversion
in v0.1 — that's a future feature.
Unknown operation names raise AttributeError, so hasattr(client, "Op") works.
CLI
soaptest http://www.dataaccess.com/webservicesserver/NumberConversion.wso?WSDL
Prints the operation catalog to stdout and exits.
In pytest
import pytest
from soaptest import Client
WSDL = "https://yourservice.example.com/service?WSDL"
@pytest.fixture(scope="session")
def soap_client():
return Client.from_wsdl(WSDL)
def test_something(soap_client):
result = soap_client.SomeOperation(param="value")
assert result.status == "OK"
Roadmap
v0.1 ships the discovery layer only. Planned for later releases:
- Fault translation — map SOAP faults to a typed
SoapFaultPython exception - pytest fixture plugin —
@pytest.fixturehelpers and a--wsdlCLI option - Type-stub generation — emit
.pyistubs so IDEs can autocomplete operations - Record/replay — record live responses to YAML cassettes; replay offline
Contributing
File a bug or feature request in the issue tracker. Pull requests are welcome once an issue is open. For major changes, open an issue first to discuss scope.
License
MIT. See LICENSE.
Metadata
Release files for soaptest 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| soaptest-0.1.2.tar.gz | 8.1 kB | With provenance | Details for soaptest-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soaptest-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for soaptest-0.1.2-py3-none-any.whl |
Total release size: 16.4 kB
Release files / soaptest-0.1.2.tar.gz
| Download URL | soaptest-0.1.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69f4d10da42efa95751a7d7720c9933bb5903f1301d3fc9c7b03788498adf019
|
|
BLAKE2b-256 checksum How to use checksums |
d200a311a1936494eeda8feebb522d7155d538e32d41d7c252a8746140bb3e92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / soaptest-0.1.2-py3-none-any.whl
| Download URL | soaptest-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0bc4b7dfde1e7565ac1eed5076cb2f80ea20223a742603654bf465fdfe6852f
|
|
BLAKE2b-256 checksum How to use checksums |
781d22dd7ff331e3f63228dbb46f18d225bad4bfe56ef893cd85499180f14ecb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logSecurity for soaptest 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for soaptest-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.