Skip to content

API Test

Runs Tavern YAML API tests against your service. The HOST environment variable is automatically set to the base URL of the target service.

FieldTypeRequiredConstraintsDescription
filestringYesPath to the Tavern YAML file, relative to repo root
cpuCoresfloatNo0 < value ≤ 2
memoryMBintegerNo≤ 4096
targetNamestringNoName of the service to test. Defaults to the first service
envtableNoEnvironment variables injected into the test runner. HOST is set automatically
[apitest]
file = ".nurburgdev/apitest.tavern.yaml"
test_name: Get items returns 200
includes:
- !include common.yaml
stages:
- name: Get items
request:
url: "{host}/api/items"
method: GET
response:
status_code: 200
NameDescription
SUMMARYPercentage of test cases that passed
REPORTPer-test case results