Disabling TLS certificate verification

Sometimes, during testing, it is needed to disable TLS verification of the service under test.


st run --request-tls-verify


import schemathesis

schema = schemathesis.from_uri("")

def test_api(case):
    # If you need `response`
    response =
    # Alternatively if you don't need `response`

It is possible to use an unencrypted certificate (e.g. PEM) by using the --request-cert /file/path/example.pem argument.

st run --request-cert client.pem ...

It is also possible to provide the certificate and the private key separately with the usage of the --request-cert-key /file/path/example.key argument.

st run --request-cert client.crt --request-cert-key client.key ...

Using an HTTP(S) proxy

Sometimes you need to send your traffic to some other tools. You could set up a proxy via the following env variables:

$ export HTTP_PROXY=""
$ export HTTPS_PROXY=""
$ st run

Per-route request timeouts

Different API operations may need different timeouts during testing. You could achieve it this way:

import schemathesis

DEFAULT_TIMEOUT = 10  # in seconds
schema = schemathesis.from_uri(SCHEMA_URL)

def test_api(case):
    key = (
    timeout = {
        ("GET", "/users"): 5,
        # and so on
    }.get(key, DEFAULT_TIMEOUT)

In the example above, the default timeout is 10 seconds, but for GET /users it will be 5 seconds.