PURE TCP/UDP Tasks - Version 2.3

This document describes the PURE TCP/UDP Tasks, provided as custom tasks that must be installed with PureLoad/PureTest on each installation using these tasks.

Before you use the tasks, read more about installing and how to load custom tasks .

Backwards compatibility

The PURE TCP tasks are not backwards compatible with previous version (version 1.x). This means that you must convert PLC files using the 1.x version of the tasks, before using them with the latest version. To convert a PLC file please use the following steps:

  1. Run the sed-script located in extensions/test/pure-tcpudp to convert the PLC file:
    sed -f extensions/test/pure-tcpudp/tcpsedscript.txt < old.plc > new.plc
  2. Load the converted PLC file into PureLoad
  3. Manually add PureTcpConnectTask after the PureTcpInitTask
  4. Save the PLC file

PURE TCP/UDP Protocol Support

The PURE TCP/UDP tasks supports the PURE TCP/UDP protocol.

Task overview

Client side tasks exist to initiate and handle TCP/UDP connections and to send and receive PURE TCP/UDP connections.

All tasks are designed to work with the PURE TCP/UDP server.

TCP/UDP Buffer sizes

An important aspect when using the TCP/UDP tasks and server is related to the buffers used, by the application and also on OS level. The following is an introduction, but note that this is OS dependent and settings might be adjusted for the OS and network you are using for testing.

TCP

The PureTcpInitTask have options to specify what TCP buffer sizes to be used. When executed the task will try to set the buffer sizes per socket using the SO_SNDBUF and SO_RCVBUF setsockopt system calls.

Note that this is only a hint to the OS to increase the buffer size to what is specified. If the tasks is executed using DEBUG logging, you will se what size that are actually used. To tune the maximum buffer sizes that can be used (on Linux), see the following references:

UDP

As described above for TCP, the PureUdpInitTask also have options to specify what UDP buffer sizes to be used. In addition you must specify the max UDP datagram packet sizes to be used. Default is 1472 bytes, which is the typical default size when the OS is configured to use an MTU of 1500.

As for TCP tuning buffer sizes and UDP datagram sizes can be quite complicated and also depends on what you want to test. If you want to test a "real life" situation, assuming default MTU is 1500, we suggest that you use default UDP datagram packet size and possibly increase only the send and receive buffer sizes.

Note: if you change the UDP packet size, you must to the same adjustment on the server.

Provided tasks

The following lists the provided tasks. Please follow the links for more details.


PureTcpInitTask

Task to initialize a TCP based client. Client will bind to the local IP address and port, but network operations are done.

Parameters

Parameters exist to specify local and repote IP addresses and ports. In addition TCP send and receive buffer sizes can be specified.

Use the spot-help in PureTest/PureLoad for information about each parameter.


PureTcpConnectTask

Task to connect remote server. A basic TCP connect operation will be executed.


PureTcpSendTask

Task to send specified number of bytes to remote server using the TCP based PURE protocol..

Parameter is used to specify the number of randomly generated bytes to be sent.


PureTcpRetrieveTask

Task to retrieve bytes from remote server using the TCP based PURE protocol.

Parameter is used to specify the number of randomly generated bytes to be retrieved.


PureTcpCloseTask

Task to close connection to server.

Parameter exist to optionally send a CLOSE message to server to allow the server to close the connection.


PureUdpInitTask

Task to initialize an UDP based client. Client will bind to the local IP address and port, but network operations are done.

Parameters

Parameters exist to specify local and remote IP addresses and ports. In addition TCP send and receive buffer sizes can be specified. There are also options to control if UDP statistics to be written to file.

Use the spot-help in PureTest/PureLoad for information about each parameter.


PureUdpConnectTask

Task to create a connected UDP socket. I.e client can only send and receive datagrams to/from the specified remote host and port.


PureUdpSendTask

Task to send specified number of bytes to remote server using the UDP based PURE protocol.

Parameter is used to specify the number of randomly generated bytes to be sent.


PureUdpRetrieveTask

Task to retrieve bytes from remote server using the UDP based PURE protocol.

Parameter is used to specify the number of randomly generated bytes to be retrieved.


PureUdpCloseTask

Task to close the client socket.

Parameter exist to optionally send a CLOSE message to server to allow the server to cleanup the current session.