Integrated Test Environment uses a software agent that communicates with InterChange Server Express to perform tests. This agent must communicate with InterChange Server Express and the tools through a port using Remote Method Invocation (RMI). Integrated Test Environment also requires a block of nine contiguous ports over which to communicate with each connector that is emulated in the interface being tested.
You must configure your environment so that there are ports available for these communication requirements. The default RMI port is 1099, and this is the port that the Integrated Test Environment agent is configured to use by default. Integrated Test Environment is configured by default to use ports 1100 and up to communicate with the connectors being emulated in the interface.
Other programs installed on your system may be configured to use port 1099, however, so you must determine which ports you can use. After determining which ports you can use you must configure settings in Integrated Test Environment to use the desired port as well as set a property in the start_server.bat batch file.
Before attempting to use Integrated Test Environment, you should use the techniques described in the following sections to determine if the ports it is configured to use by default are available or not.
You can execute the netstat command at a command line interface in Windows to generate a list of the ports that are currently in use. It is recommended that you use the -a option to list all of the ports in use, rather than just those used for TCP/IP. You might also want to use the -n option, which orders the ports numerically.
The following example shows the use of the netstat command and a portion of the returned output:
C:\>netstat -a -n Active Connections Proto Local Address Foreign Address State TCP 0.0.0.0:80 0.0.0.0:0 LISTENING TCP 0.0.0.0:135 0.0.0.0:0 LISTENING TCP 0.0.0.0:371 0.0.0.0:0 LISTENING TCP 0.0.0.0:445 0.0.0.0:0 LISTENING TCP 0.0.0.0:1029 0.0.0.0:0 LISTENING TCP 0.0.0.0:1030 0.0.0.0:0 LISTENING
The first entry shows that port 80 is being used and the last line shows that port 1030 is being used. Examine the lines to determine if ports 1099 through 1108 are being used. It is recommended that you copy the output into a text file where you can search for the port numbers.
If ports 1099 through 1108 are in use already then you must change the settings as described in Setting the RMI port in start_server.bat and Setting the RMI port in start_server.bat.
Besides using the netstat command to determine which ports are currently in use, you can also check the services file to determine which ports are reserved. Do the following:
If you find any such entries, you might experience complications when trying to use Integrated Test Environment with the default configuration. Change the settings as described in Setting the RMI port in start_server.bat and Setting the RMI port in start_server.bat if so.
If you follow the instructions in Determining which ports to use and determine that the ports used by Integrated Test Environment by default are already in use then you must set the preferences for Integrated Test Environment to use ports that are available.
Integrated Test Environment requires a single port for the test environment agent to communicate with the server. It also requires nine ports to communicate with up to nine connector agents that can be emulated during a test. You configure the port number that Integrated Test Environment will use for the first of the nine possible connector agents, and then it uses the eight ports above that number for the others, so you must ensure that there is a block of nine contiguous ports available. If you do not have nine connectors that require emulation in the interface then you can use a smaller block of ports. Ideally, you should find a block of ten available ports so that all of the ports related to the Integrated Test Environment are contiguous.
Do the following to configure the port usage for Integrated Test Environment:
Figure 58 shows the Test Server preferences.
The default value is 1099.
The default value is 1100. Integrated Test Environment uses the value in the Base port number field for the first connector agent that must be emulated, and use the subsequent port numbers for other connector agents.
If you do not configure the Integrated Test Environment preferences to use a custom batch file to start the server then you must add the RMI port configuration information to the start_server.bat batch file yourself.
Even if you plan to use the default RMI port number of 1099, you must add the property to the batch file and set it equal to the default value. Do the following to do so:
%CWJAVA% -Djava.ext.dirs=%JRE_EXT_DIRS%;"%MQ_LIB%";"%DB2_LIB%" -Duser.home="%CROSSWORLDS%" -mx%CW_MEM_HEAP%m -DTEAgent=1099 -DCW_MEMORY_MAX=%CW_MEM_HEAP% %ORB_PROPERTY% -classpath %JCLASSES% ServerWrapper -s%SERVERNAME% %2 %3