Skip to content

bddkit

a harness, not a cage.

Tests in plain Gherkin, for everything your product talks to

Section titled “Tests in plain Gherkin, for everything your product talks to”

Browsers and apps

Drive a real browser or a phone app through plugins, in the same language as your API tests.

APIs and databases

Call an HTTP API, seed a database, and assert on both in one scenario, without glue code between tools.

Checked before it runs

Every step is validated before the first request. A typo costs a second, not a failed run halfway through.

Feature: users and their posts
Scenario: a user's posts belong to that user
Given the "Accept" request header is "application/json"
When I request "/users/1" using HTTP GET
Then the response code is 200
And the response body contains JSON:
"""
{"id": "@variableType(int)", "email": "@regExp(/^[^@]+@example\\.com$/)"}
"""
And extract "id" from JSON as "userId"
Given the query parameter "userId" is "<<userId>>"
When I request "/posts" using HTTP GET
Then the response code is 200
And the response body is a JSON array of length 3
And the JSON node "[0].userId" should exist
Terminal window
curl -fsSL https://raw.githubusercontent.com/bddkit/bddkit/main/install.sh | sh

Then start with the first suite.