DamageBDD Live Example
Select and add 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}}" 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}}" 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}}"
Add Step
Feature: Http test feature
Scenario: Test post json
Given I am using server "http://localhost:8080"
And I set "Content-Type" header to "application/json"
When I make a POST request to "/tests/"
"""
{
"refund_address": "mohjSavDdQYHRYXcS3uS6ttaHP8amyvX78",
"customer_type": "Individual",
"full_name": "John Doe",
"date_of_birth": "1980-01-01",
"address": "123 Main Street, Sydney, NSW",
"identification_verification": {
"document_type": "Passport",
"document_number": "A1234567"
},
"email": "john.doe@damagebdd.com",
"phone": "0412345678"
}
"""
Then the response status must be "201"
Then the json at path "$.email" must be "john.doe@damagebdd.com"
Execute