Test::BDD::Infrastructure::Socket - cucumber step definitions for tcp/udp/unix-socket tests
version 1.005
Scenario: check openssh server Given a tcp connection to localhost on port 22 is made Then the connection must be successfully enstablished And the connection must recieve an line like ^SSH-2.0 Scenario: Check connection to www.perl.org Given a tcp connection to www.perl.org on port 80 is made Then the connection must be successfully enstablished When the connection sends the line GET / HTTP/1.0 And the connection sends the line Host: www.perl.org And the connection sends an empty line Then the connection must recieve an line like HTTP/1.1 301 Moved Permanently
First create a connection:
Given a (tcp|udp) connection to <host> on port <port> is made Given a connection on socket <path> is opened
Check connection state:
Then the (connection|socket) must be (successfully) enstablished/, sub { Then the (connection|socket) must fail ((with) an error like) <msg>
Send/recieve commands:
When the (connection|socket) sends the line <text> When the (connection|socket) sends an empty line Then the (connection|socket) must recieve an line like <regex>
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.