Run the Test Scripts

The primary test script, bin/regress, can be run either as part of making the shim, via the make target make test, or directly. It runs the shim in data mode, so that no orders can be made, and sends a variety of subscription and query requests to the IB tws.

From the directory where you unpacked the shim, type the command
bin/regress, as in Figure 3.10. The shim should connect, and after the connect messages bits and pieces of cruft may appear on the screen; these would be debug output that occur as part of ongoing development and are sent to the stderr, and may for the most part be ignored. Much more to the point, however, an additional konsole window should pop open on the screen and remain open until the shim exits.

Figure 3.10: Running the primary test script
\begin{figure}\small
\begin{verbatim}shim-070810$ bin/regressThe trading shi...
... 0xb714731c 0xb6fcc6b4
src$ ScimInputContextPlugin()\end{verbatim}
\end{figure}

Figures 3.11 and 3.12 are screenshots from the begining and end of the traced output from bin/regress script. The text in the figures consists in essence of the log output file ShimText echoed to a konsole window by the Unix utility tail, and you can look at the scripts bin/tail.window and bin/log.filter to see what is happening.

Figure 3.11: Screen shot of history, news, account data and contract data queries
Figure 3.12: Screen shot of market and market depth data, ending with shim exit
\includegraphics[width=5.5in]{eps/xwd1.eps} \includegraphics[width=5.5in]{eps/xwd2.eps}

In Figure 3.11 we see the progran banner, market data and history farm status messages from the IB tws, a history query and its answer, the status message as that result is inserted into the database, a news check, and a subscription to account data.

Figure 3.12 consists of tick data for a number of symbols that were subscribed to earlier in the session via the bulk subcription command, the quit command, and one lonely tick message bringing up the rear, since the quit is not acted on until all events from the current time tick have been logged.

Although there are a mass of details not yet considered, you can see that the text log is in essence a catenation of the command, request, and message events that occur during a shim session.

Bill Pippin 2010-01-14