You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cukes-rest takes simplicity of Cucumber and provides bindings for HTTP specification. As a sugar on top, cukes-rest
adds steps for storing and using request/response content from a file system, variable support in .features, context
inflation in all steps and a custom plug-in system to allow users to add additional project specific
content.
Feature: Gadgets are great!
Background:
Given baseUri is https://my-server.com/rest/
Scenario: Should create another Gadget objectGiven request body from file gadgets/requests/newGadget.json
And content type is "application/json"When the client performs POST request on /gadgets
Then status code is 201
And header Location contains "https://localhost:8080/gadgets/"When the client performs GET request on {(header.Location)}
Then status code is 200
And response contains property "id" with value other than "2000"And response contains property "name" with value "Nexus 9"And response does not contain property "updatedDate"
There are three sections available to be used in a Feature files:
Feature - a description of a feature under test
Background - set of steps to be executed before every scenario (usually these are preconditions)
Scenario - a single automated test case
As well as three groups of steps available
Given - building up a HTTP request to be performed