Blog
Feature: API Testing XML
Scenario: *** Create order ***
Given address "https://example.com"
Given URL path "/order/create"
Given format "XML"
Given request "create_order.xml"
When the URL is invoked
Then status is "200"
And response is equal to that from "expected_order_response.xml"
"POST"
HTTP verb, use the following steps.Feature: API Testing Form
Scenario: *** Create order ***
Given address "https://example.com"
Given URL path "/order/create"
Given format "FORM"
Given REST method "POST"
Given form field "order_type" is "new"
Given form field "user_id" is "123"
When the URL is invoked
Then status is "200"
And form is cleaned up
Feature: API Testing RAW Format
Scenario: *** Create order ***
Given address "https://example.com"
Given URL path "/order/create"
Given format "RAW"
Given request is "My data"
When the URL is invoked
Then status is "200"
And response is equal to "abc,def\n123,456"