Steps
This page is generated from bddkit steps list --json. Plugin steps are not listed here; see Plugins.
action
Section titled “action”| Step | Does |
|---|---|
the "<name>" request header is "<value>" |
sets a header on the request being built, replacing any previous value |
I add "<value>" to the "<name>" request header |
appends another value to a request header, keeping what is already there |
the query parameter "<name>" is "<value>" |
sets a query string parameter on the request being built |
the request body is: |
sets the request body from the docstring below the step |
the request body is empty |
clears the request body built so far |
the request form parameters are: |
sends the table below as form-encoded parameters instead of a body |
I attach the file "<file>" to the request as "<name>" |
attaches a file, path relative to this feature file, as a multipart/form-data part |
I request "<path>" using HTTP <method> |
performs the request against the current API with this method |
I request "<path>" |
performs a GET request against the current API |
I sign the next request with Hawk id "<id>" and key "<key>" |
signs the next request with these Hawk credentials, and every replay of it |
I use "<name>" api |
switches to another API resource and its default headers, until the scenario ends |
assertion
Section titled “assertion”| Step | Does |
|---|---|
the response code is <code> |
asserts the HTTP status code of the last response |
the response body contains JSON: |
asserts the response body contains this JSON — object subsets pass, array order is ignored |
the response body equals JSON: |
asserts the response body equals this JSON exactly, key for key and element for element |
the response body is a JSON array of length <length> |
asserts the response body is a JSON array holding this many elements |
the "<name>" response header is "<value>" |
asserts a response header holds exactly this value |
the JSON node "<path>" should exist |
asserts the response body has a node at this JSON path |
the JSON node "<path>" should not exist |
asserts the response body has no node at this JSON path — a null value still counts as existing |
the JSON node "<path>" should be null |
asserts the node at this JSON path exists and is JSON null |
the JSON node "<path>" should not be null |
asserts the node at this JSON path exists and is not JSON null |
the response body does not contain JSON: |
asserts the response body does not contain this JSON — same subset/order-independent matching as contains, inverted |
the JSON node "<path>" should not contain "<substring>" |
asserts a string node does not contain this substring |
the response body should be empty |
asserts the response body is empty |
the response body contains "<text>" |
asserts the raw response body contains this text — works for any content type |
the response body does not contain "<text>" |
asserts the raw response body does not contain this text |
the response body matches "<pattern>" |
asserts the raw response body matches this regular expression |
the response body does not match "<pattern>" |
asserts the raw response body does not match this regular expression |
the response body has element "<selector>" |
asserts an HTML (CSS selector) or XML (XPath) element matches in the response body |
the response body has element "<selector>" with text "<text>" |
asserts the matched elements’ text, newline-joined if more than one, equals this value exactly |
the response body does not have element "<selector>" |
asserts no element matches this selector in the response body |
general
Section titled “general”action
Section titled “action”| Step | Does |
|---|---|
I expect the next assertion to pass eventually |
lets the next assertion retry with the configured polling options |
I expect the next assertion to pass within "<seconds>" seconds, checking every "<milliseconds>" milliseconds |
lets the next assertion retry for this long, at this interval |
I expect the next assertion to pass within "<seconds>" seconds |
lets the next assertion retry for this long, at the configured interval |
I sleep "<seconds>" seconds |
pauses the scenario — a last resort, an eventual assertion is usually what you want |
I include "<file>"( with:) |
Runs the only scenario of another feature file inline, sharing HTTP/DB/plugin state. |
I include "<file>" with prefix "<prefix>"( with:) |
Runs the only scenario of another feature file inline, sharing HTTP/DB/plugin state. |
I include "<file>" scenario "<name>"( with:) |
Runs one named scenario of another feature file inline, sharing HTTP/DB/plugin state. |
I include "<file>" scenario "<name>" with prefix "<prefix>"( with:) |
Runs one named scenario of another feature file inline, sharing HTTP/DB/plugin state. |
action
Section titled “action”| Step | Does |
|---|---|
set variable "<name>" to "<value>" global |
sets a variable every scenario of this feature file can read |
set variable "<name>" to "<value>" |
sets a variable for the whole feature file |
extract "<path>" from JSON as "<name>" global |
reads a JSON path of the response into a variable the whole file can see |
extract "<path>" from JSON as "<name>" |
reads a JSON path of the response into a variable |
extract "<cookie>" from cookies as "<name>" global |
reads a response cookie into a variable the whole file can see |
extract "<cookie>" from cookies as "<name>" |
reads a response cookie into a variable |
extract "<selector>" from response body as "<name>" |
reads the matched elements’ text, newline-joined if more than one, into a variable |
extract "<path>" from variable "<variable>" as JSON as "<name>" global |
reads a JSON path of a variable’s text into a variable the whole file can see |
extract "<path>" from variable "<variable>" as JSON as "<name>" |
reads a JSON path of a variable’s text into a variable |
extract "<pattern>" from variable "<variable>" as "<name>" global |
reads the first capture group of a regex over a variable’s text into a variable the whole file can see |
extract "<pattern>" from variable "<variable>" as "<name>" |
reads the first capture group of a regex over a variable’s text into a variable |
I encrypt "<value>" with AES using key "<key>" as "<name>" |
encrypts a value with an AES key and stores the result in a variable |
assertion
Section titled “assertion”| Step | Does |
|---|---|
variable "<name>" should not be equal to "<value>" |
asserts a variable differs from this value |
variable "<name>" should be equal to "<value>" |
asserts a variable holds exactly this value |
variable "<name>" should contain "<text>" |
asserts a variable’s text contains this substring |
variable "<name>" should not contain "<text>" |
asserts a variable’s text does not contain this substring |
variable "<name>" should match "<pattern>" |
asserts a variable’s text matches this regular expression, unanchored |
variable "<name>" should not match "<pattern>" |
asserts a variable’s text does not match this regular expression |
variable "<name>" should be empty |
asserts a variable’s text is empty or whitespace only |
variable "<name>" should contain JSON: |
asserts a variable’s text is JSON containing this JSON — same matching as the response body contains JSON |
variable "<name>" should equal JSON: |
asserts a variable’s text is JSON exactly equal to this JSON |
variable "<name>" should not contain JSON: |
asserts a variable’s text is JSON that does not contain this JSON |
action
Section titled “action”| Step | Does |
|---|---|
I use "<name>" connection |
switches to another database connection, until the scenario ends |
I have "<table>" where: |
inserts one row per line of the table below, its header naming the columns |
I have "<table>" with "<pairs>" |
inserts one row, filling required columns the pairs omit from the table schema |
I have: |
inserts rows into several tables, the first column of the table below naming each one |
I update "<table>" with "<pairs>" where "<condition>" |
updates matching rows and stores the affected count in updated_<table> |
I delete all "<table>" |
wipes the whole table — no WHERE, and no awareness of files running in parallel |
I delete "<table>" where "<condition>" |
deletes matching rows and stores the affected count in deleted_<table> |
I extract "<column>" from "<table>" with "<condition>" as "<name>" |
reads a column of the first matching row into a variable |
I call procedure "<name>" with "<arguments>" |
calls a stored procedure with these arguments |
I call function "<name>" with "<arguments>" as "<variable>" |
calls a function and stores its return value in a variable |
I get next value of sequence "<name>" as "<variable>" |
advances a sequence and stores the new value in a variable |
assertion
Section titled “assertion”| Step | Does |
|---|---|
I should not have "<table>" with: |
asserts no row matches any line of the table below |
I should not have "<table>" with "<pairs>" |
asserts no row matches these column values |
I should have "<table>" with: |
asserts a row matches each line of the table below |
I should have "<table>" with "<pairs>" |
asserts at least one row matches these column values |
action
Section titled “action”| Step | Does |
|---|---|
I am in debug mode |
prints the generated SQL, its binds and plugin exchanges to stderr |
I am not in debug mode |
stops the debug output turned on earlier in the scenario |
Show all variables |
prints every variable in scope to stderr |
Show "<name>" variable |
prints one variable to stderr, failing if it is not set |
Print response headers |
prints the headers of the last response to stderr |
Print response body |
prints the body of the last response to stderr, highlighted |
Print response body as "<path>" |
prints one JSON path, XPath (XML) or CSS selector (HTML) selection of the last response to stderr |
Print table: |
prints the table below to stderr with variables filled in and columns aligned |
action
Section titled “action”| Step | Does |
|---|---|
I generate an SRP verifier for "<username>" with password "<password>" and salt "<salt>" as "<prefix>" |
computes an SRP verifier from this salt into <prefix>_salt and <prefix>_verifier |
I generate an SRP verifier for "<username>" with password "<password>" as "<prefix>" |
computes an SRP verifier from a fresh salt into <prefix>_salt and <prefix>_verifier |
I start an SRP login as "<prefix>" |
starts an SRP login, storing the client values in <prefix>_a and <prefix>_A |
I complete SRP login "<prefix>" for "<username>" with password "<password>" salt "<salt>" and "<server_public>" |
answers the server challenge into <prefix>_M1, <prefix>_M2 and <prefix>_sessionKey |