dafiti/web-api-extension

Web API extension for Behat

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 275

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 18

Forks: 128

Type:behat-extension

1.0.0 2017-03-22 15:44 UTC

This package is not auto-updated.

Last update: 2022-02-19 04:43:12 UTC


README

Build Status Scrutinizer Code Quality

Provides testing for JSON APIs with Behat 3

Documentation

Official documentation

Steps

Given /^all requests are in JSON$/
Given /^I am authenticating as "([^\"]*)" with "([^\"]*)" password$/
Given /^I set header "([^\"]*)" with value "([^\"]*)"$/
Given /^the response json should have a "([^\"]*)" key$/
Given /^the response json should have a "([^\"]*)" key with value "([^\"]*)"$/
Given /^the key "([^\"]*)" should have a subkey "([^\"]*)"$/
Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" with value (\d+)$/
Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" with value "([^\"]*)?"$/
Given /^the key "([^\"]*)" should have a subkey "([^\"]*)" in index (\d+)$/
Given /^the response json's "([^\"]*)" key should be of type "([^\"]*)"$/
 Then /^Set PlaceHolder with key '([^\']*)' and values "([^\"]*)"$/
 Then /^Set PlaceHolder with key "([^\"]*)" and values "([^\"]*)"$/
 Then /^Set PlaceHolder with key "([^\"]*)" and value "([^\"]*)"$/
 Then /^Set PlaceHolder with key "([^\"]*)" and dinamic value "([^\"]*)"$/
 Then /^(?:the )?response code should be (\d+)$/
 Then /^(?:the )?response should contain "([^\"]*)"$/
 Then /^(?:the )?response should not contain "([^\"]*)"$/
 Then /^(?:the )?response should contain json:$/
 Then print response
 When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)"$/
 When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with values:$/
 When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with body:$/
 When /^(?:I )?send a ([A-Z]+) request to "([^\"]+)" with form data:$/

Copyright

Copyright (c) 2014 Konstantin Kudryashov (ever.zet). See LICENSE for details.

Contributors