Skip to main content


Testkube is able to run cURL commands as tests.

Abstraction over cURL

Testkube executor provides an abstraction over cURL that allow you to create JSON-based cURL test files. They allow you to combine a cURL command with expected results:

  • expected_status allows you to assert that a specific status code is returned.
  • expected_body allows you to validate the body of the response.

Below is an example of how to format the test:

"command": [
"'Accept: application/json'"
"expected_status": "200",
"expected_body": "{\"success\":\"true\"}"

You can also find this test in the Testkube repository:

Example Test

In this example we will use the following cURL test:

"command": [
"expected_status": "200"

Creating and Running a Test

If you prefer to use the Dashboard, just go to Tests, and click the Add a new test button. Fill in the Test Name, choose the Test Type (curl/test), and then choose Test Source.


For a File source, the test file is uploaded directly.

curl test - creation dialog - file

Git File

For a Git file, you need to fill in the repository details - Git repository URI (in this case, branch (main), and the path to the cURL test in your repository (test/curl/executor-tests/curl-smoke-test.json). In this example, the repository is public, but in the case of private ones, you would need to additionally fill in the Git credentials.

curl test - creation dialog - git file

When the Test CRD is saved to the yaml file, it can then be applied directly with kubectl apply -f SOME_FILE_NAME.yaml.