The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::BDD::Infrastructure::Socket - cucumber step definitions for tcp/udp/unix-socket tests

VERSION

version 1.005

Synopsis

  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

Step definitions

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>

AUTHOR

Markus Benning <ich@markusbenning.de>

COPYRIGHT AND LICENSE

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.