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

NAME

OPCUA::Open62541::Test::Client - run open62541 client for testing

SYNOPSIS

  use OPCUA::Open62541::Test::Client;
  use Test::More tests => OPCUA::Open62541::Test::Client::planning();

  my $client = OPCUA::Open62541::Test::Client->new();

DESCRIPTION

In a module test start and run an open62541 OPC UA client that connects to a server. The client is considered part of the test and will write to the TAP stream.

OPCUA::Open62541::Test::Client::planning

Return the number of tests results that running one client will create. Add this to your number of planned tests.

METHODS

$client = OPCUA::Open62541::Test::Client->new(%args);

Create a new test client instance.

$args{port}

Port number of the server.

$args{timeout}

Maximum time the client will run during iterate. Defaults to 10 seconds.

$client->start()

Connect the client to the open62541 server.

$client->stop()

Disconnect the client from the open62541 server.

SEE ALSO

OPCUA::Open62541, OPCUA::Open62541::Test::Server

AUTHORS

Alexander Bluhm <bluhm@genua.de>,

COPYRIGHT AND LICENSE

Copyright (c) 2020 Alexander Bluhm

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Thanks to genua GmbH, https://www.genua.de/ for sponsoring this work.