|
Testing a TCP Server Device (Scripting) |
|
|
Preconditions
Performing the test
A) Setting the Communication Options
TIP: If you want to connect to a server that runs on the same computer as Docklight, you can use the keyword LOCALHOST instead of the actual IP address of your computer (e.g. LOCALHOST:10001 for connecting to a server on port 10001 on the same computer). Using the loopback address 127.0.0.1 will have the same effect.
B) Defining the Send Sequences and Receive Sequences used: Define all of the commands and responses required for your test, as described in Testing a Serial Device or a Protocol Implementation.
C) Running the test Establish a connection by choosing
Docklight Scripting now tries to connect to the TCP server device. After the connection is established, you can send one of your predefined Send Sequences using the
NOTE: If the server closes the TCP session before you choose
NOTE: If you receive the error "IP Address / TCP port in use" when starting communications, check if another server or even another Docklight Scripting instance is blocking the port. Also try closing and restarting Docklight Scripting - sometimes the TCP driver layer used by Docklight Scripting does not release a TCP port until the application using it is closed.
NOTE: Even if there is no other server or client blocking a port, it may take up to 4 minutes until a port is actually released and available again. This is a restriction in the TCP driver layer used in Docklight Scripting, and unfortunately Docklight Scripting cannot control this.
|