Test::BDD::Infrastructure::HTTP - cucumber step definitions for http based checks
version 1.005
Scenario: A URL must be reachable Given the http URL https://markusbenning.de/ When the http request is sent Then the http response must be a redirect And the http response status code must be 302 And the http response status message must be like ^Found And the http response header Location must be like ^https://markusbenning.de/blog/ And the http response header Content-Type must be like text/html And the http response content must be like The document has moved And the http response content size must be at least 200 byte
The test must start with
Given the URL <url>
followed by additional parameters.
Then the request is sent with:
When the http request is sent
After the request has been sent the response could be examined with response checks:
Then the http response ...
Given the http user agent is <agentstring> Given the http proxy for <protocol> is <url> Given the http ssl option <option> is <value> Given the http request method is <method> Given the http request header <header> is set to <value> Given the http timeout is set to <timeout> seconds
Then the http response must be (a )<successfull|error|failure|redirect|info> Then the http response status code must be <code> Then the http response status message must be like <regex> Then the http response header <header> must be like <regex> Then the http response content must be unlike <regex> Then the http response content must be like <regex> Then the http response content size must be <compare> <count> <unit>
Markus Benning <ich@markusbenning.de>
This software is copyright (c) 2015 by Markus Benning.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::BDD::Infrastructure, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::BDD::Infrastructure
CPAN shell
perl -MCPAN -e shell install Test::BDD::Infrastructure
For more information on module installation, please visit the detailed CPAN module installation guide.