DamageBDD

Behaviour Driven Development At Planetary Scale.

Damagebdd - Steps Manual


Available Step Definitions

On this page you can find all the currently implemented and documented step definitions and the arguments accepted by them.

Http Steps


Given I am using server "{{Server}}"
Given I set "{{Header}}" header to "{{Value}}"
When I make a GET request to "{{Path}}"
When I make a OPTIONS request to "{{Path}}"
When I make a HEAD request to "{{Path}}"
When I make a TRACE request to "{{Path}}"
When I make a POST request to "{{Path}}"
When I make a CSRF POST request to "{{Path}}"
When I make a PATCH request to "{{Path}}"
When I make a PUT request to "{{Path}}"
When I make a DELETE request to "{{Path}}"
Then the response must contain text "{{Contains}}"
Then I print the response
Given I store cookies
Given I set base URL to "{{URL}}"
Given/When/Then/And I set the variable "{{Variable}}" to "{{Value}}"
Given/When/Then/And I do not want to verify server certificate
Given/When/Then/And I make a HEAD request to "{{Path}}"
Given/When/Then/And the JSON should be
Then the response status must be "{{Status}}"
Then the yaml at path "{{Path}}" must be "{{Expected}}"
Then the json at path "{{Path}}" must be "{{Expected}}"
Then the response status must be one of "{{Statuses}}"
Then the "{{Header}}" header should be "{{Value}}"
Then I store the JSON at path "{{Path}}" in "{{Variable}}"
Then the variable "{{Variable}}" should be equal to JSON "{{Value}}"
Then the variable "{{Variable}}" should be equal to JSON
Then the JSON at path "{{JsonPath}}" should be
Then the json at path "{{JsonPath}}" must be
Then I set BasicAuth username to "{{User}}" and password to "{{Password}}"
Then I use query OAuth with key="{{Key}}" and secret="{{Secret}}"
Then I use header OAuth with key="{{Key}}" and secret="{{Secret}}"

Utility Steps


Given/When/Then/And I store an uuid in "{{Variable}}"
Given/When/Then/And I wait "{{Seconds}}" seconds
Given/When/Then/And I store current time string in "{{Variable}}" with format "{{Format}}"

Selenium Webdriver Steps


Given the page url is not "{{Url}}"
Then I expect that the url is "{{Url}}"
Then I expect that the url is not "{{Url}}"
And I click on the link "{{Link}}"
And I open the site "{{Site}}"
And I open the url "{{Url}}"

Step Details

Http Steps


Given I am using server "{{Server}}"

back to top

Use the server "Server" as target server to test for following steps.


Given I am using server "https://damagebdd.com":
Given I set "{{Header}}" header to "{{Value}}"

back to top

Use the header value "Value" for request header "Header" for following http steps.



When I make a GET request to "{{Path}}"

back to top

Make a HTTP GET request to the given path


When I make a GET request to "/path"
When I make a OPTIONS request to "{{Path}}"

back to top

Make a HTTP OPTIONS request to the given path


When I make a OPTIONS request to "/path"
When I make a HEAD request to "{{Path}}"

back to top

Make a HTTP HEAD request to the given path


When I make a HEAD request to "/path"
When I make a TRACE request to "{{Path}}"

back to top

Make a HTTP TRACE request to the given path


When I make a TRACE request to "/path"
When I make a POST request to "{{Path}}"

back to top

Make a http POST request to the given path


When I make a POST request to "/path" """ POST data """
When I make a CSRF POST request to "{{Path}}"

back to top

Make a http POST request to the given path, do csrf fetch before post


When I make a CSRF POST request to "/path" """ POST data """
When I make a PATCH request to "{{Path}}"

back to top

Make a http PATCH request to the given path


When I make a PATCH request to "/path" """ PATCH data """
When I make a PUT request to "{{Path}}"

back to top

Make a http PUT request to the given path


When I make a PUT request to "/path" """ PUT data """
When I make a DELETE request to "{{Path}}"

back to top

Make a HTTP DELETE request to the given path


When I make a DELETE request to "/path"
Then the response must contain text "{{Contains}}"

back to top
Then I print the response

back to top

Print the response from previouse request


When I make a PUT request to "/path"
Given I store cookies

back to top

Store the cookies in response



Given I set base URL to "{{URL}}"

back to top

Set base url



Given/When/Then/And I set the variable "{{Variable}}" to "{{Value}}"

back to top

Set a variable named "Variable" to "Value"



Given/When/Then/And I do not want to verify server certificate

back to top

Set the http client to not perform certificat verification



Given/When/Then/And I make a HEAD request to "{{Path}}"

back to top

Make a http HEAD request to "Path" on the server



Given/When/Then/And the JSON should be

back to top

The response JSON should be identical to body


Then the JSON should be """ {"examplekey":"Expected Json"} """
Then the response status must be "{{Status}}"

back to top

Ensure the http response status code from previous http request is equal to "Status"



Then the yaml at path "{{Path}}" must be "{{Expected}}"

back to top

Ensure yaml at path "Path" is as "Expected"



Then the json at path "{{Path}}" must be "{{Expected}}"

back to top

Set base url



Then the response status must be one of "{{Statuses}}"

back to top

Set base url



Then the "{{Header}}" header should be "{{Value}}"

back to top

Set base url



Then I store the JSON at path "{{Path}}" in "{{Variable}}"

back to top

Set base url



Then the variable "{{Variable}}" should be equal to JSON "{{Value}}"

back to top

Set base url



Then the variable "{{Variable}}" should be equal to JSON

back to top



Then the JSON at path "{{JsonPath}}" should be

back to top



Then the json at path "{{JsonPath}}" must be

back to top



Then I set BasicAuth username to "{{User}}" and password to "{{Password}}"

back to top

Set base url



Then I use query OAuth with key="{{Key}}" and secret="{{Secret}}"

back to top

Set base url



Then I use header OAuth with key="{{Key}}" and secret="{{Secret}}"

back to top

Set base url



Utility Steps


Given/When/Then/And I store an uuid in "{{Variable}}"

back to top

Generate and store an uuid value in Variable



Given/When/Then/And I wait "{{Seconds}}" seconds

back to top

Generate and store an uuid value in Variable



Given/When/Then/And I store current time string in "{{Variable}}" with format "{{Format}}"

back to top

Generate and store an uuid value in Variable



Selenium Webdriver Steps


Given the page url is not "{{Url}}"

back to top

Generate and store an uuid value in Variable



Then I expect that the url is "{{Url}}"

back to top

Generate and store an uuid value in Variable



Then I expect that the url is not "{{Url}}"

back to top

Generate and store an uuid value in Variable




back to top

Generate and store an uuid value in Variable



And I open the site "{{Site}}"

back to top

Generate and store an uuid value in Variable



And I open the url "{{Url}}"

back to top

Generate and store an uuid value in Variable