Testomatio - Test Management for Codeception
Module for testing SOAP WSDL web services. Send requests and check if response matches the pattern.
This module can be used either with frameworks or PHPBrowser. It tries to guess the framework is is attached to. If a endpoint is a full url then it uses PHPBrowser.
Please note, that PHP SoapServer::handle method sends additional headers. This may trigger warning: “Cannot modify header information” If you use PHP SoapServer with framework, try to block call to this method in testing environment.
param string
$xmlreturn void
Opposite to seeSoapResponseContainsStructure
param string
$xPathreturn void
Checks XML response doesn’t contain XPath locator
param string
$xmlreturn void
Checks XML response equals provided XML.
Comparison is done by canonicalizing both xml`s.
Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).
param XmlBuilder|DOMDocument|string
$xmlreturn void
Checks XML response does not include provided XML.
Comparison is done by canonicalizing both xml`s. Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).
version
1.1param string
$cssOrXPathparam string
$attributereturn string
Finds and returns attribute of element.
Element is matched by either CSS or XPath
version
1.1param string
$cssOrXPathreturn string
Finds and returns text contents of element.
Element is matched by either CSS or XPath
param string
$headerparam array
$paramsreturn void
Prepare SOAP header.
Receives header name and parameters as array.
Example:
Will produce header:
param string
$codereturn void
Checks response code from server.
param string
$xmlreturn void
Checks XML response contains provided structure.
Response elements will be compared with XML provided. Only nodeNames are checked to see elements match.
Example:
Use this method to check XML of valid structure is returned. This method does not use schema for validation. This method does not require path from root to match the structure.
param string
$xPathreturn void
Checks XML response with XPath locator
param string
$xmlreturn void
Checks XML response equals provided XML.
Comparison is done by canonicalizing both xml`s.
Parameters can be passed either as DOMDocument, DOMNode, XML string, or array (if no attributes).
Example:
param XmlBuilder|DOMDocument|string
$xmlreturn void
Checks XML response includes provided XML.
Comparison is done by canonicalizing both xml`s. Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).
Example:
param string
$actionparam object|string
$bodyreturn void
Submits request to endpoint.
Requires of api function name and parameters. Parameters can be passed either as DOMDocument, DOMNode, XML string, or array (if no attributes).
You are allowed to execute as much requests as you need inside test.
Example: