Description of CHUG

Download count: 13 this month, 4682 altogether.
Downloads for CHUG :
  VMARC archive: v-206K

CHUG is a script-directed test tool for VM. The input psuedo-language includes a variety of features for control and results checking. Output includes an HTML file with color coding to highlight errors. Inputs can be a set of files with a hierarchical structure; the HTML output will match the hierarchy and include appropriate links and result reports so that results can be viewed at multiple levels. The CHUGDEMO package provides some examples of input scripts and the resulting HTML output files.

CHUG control of the test UserID(s) is total. Test scripts exist that IPL CMS, that bring up a 2nd-level system, that even log the user off and back on. Variables can be defined within scripts, and their values set in several ways including screen scraping. A limited means of combining variables is also available, e.g. concatenation and arithmetic operations. The string manipulation functions of the REXX language may also be used to process variables. There is some limited IF/THEN/GOTO control within the script. CHUG can control multiple test UserIDs simultaneously.

While CHUG creates multiple types of output files, the output is best viewed using a web browser. Color, shading, and links are used to display and distinguish script commands, the resulting lines on the test user's screen (a 24x80 3270-type terminal), and results deviating from the script's expectation. A technical description of the technique for creating hierarchical output is available.

SHRUG is a tool very similar to CHUG. It uses the same form of input files and creates the same output files. But while CHUG logs on the test user connected (that is, the test user is logged on to a logical 3270 terminal), SHRUG logs on the user disconnected and works by SCIFing commands to the test user. For much testing, the connected/disconnected status of the test user does not matter, and the same input files work with both CHUG and SHRUG. But there are some tests where it is essential that the test user be connected (use CHUG) or be disconnected (use SHRUG). Because of the latter need, we include SHRUG in this package as well.

The essential files in this package are

  • AHDLDSF ASSEMBLE -- Low-level terminal control, source code
  • AHDLDSF MODULE -- Low-level terminal control, executable
  • CHUGD EXEC -- High level control of CHUG test cases
  • CHUGM EXEC -- Low level test case control (script interpreter, mostly)
  • CHUG DOC -- Flat file with primary documentation for CHUG
  • SHRUG DOC -- Flat file with documentation for SHRUG, supplementing CHUG DOC
  • SHRUGD EXEC -- High level control of SHRUG test cases, analogous to CHUGD EXEC
  • SHRUGM EXEC -- Low level SHRUG test case control, analogous to CHUGM EXEC
  • MYMSG ASSEMBLE -- Interrupt handler used by SHRUG, source code
  • MYMSG MODULE -- Interrupt handler used by SHRUG, executable
  • CHUG DESCRIPT -- This file, a description and explanation
CHUG first came into being in 2002 as a replacement for a PC-based tool, and the original form of the script design was taken from that tool in order to ease conversion of existing tests. AHDLDSF existed long before that -- at least since 1990. Several people have contributed to one or more of the programs embodying the CHUG tool. They are
  • Tim Greer
  • Pat Cozzi
  • Debbie Woodsinger
  • Romney White
  • Steve McAdams
  • Garrett Schanck
  • Emily Kate Hugenbruch
  • Mike Cifelli
  • Perry Ruiter
  • Jeff Gertner
SHRUG built upon the CHUGM/CHUGD base, but replaced AHDLDSF with a SCIFing scheme, for which we needed an interrupt handler. Steve Shultz provided the interrupt handler and advice on how to use it.

To use CHUG, only three files (other than the test scripts) must be available: AHDLDSF MODULE, CHUGD EXEC, and CHUGM EXEC. Using SHRUG is similar; it too requires three files: MYMSG MODULE, SHRUGD EXEC, and SHRUGM EXEC. Two UserIDs are involved: the UserID that runs CHUGD/SHRUGD EXEC (which calls the other two programs), and the UserID which will get logged on by CHUG and on which the test will actually occur. The first UserID needs to have write access to a minidisk where the output files will be created. When using a web browser to view results, make sure all the HTML files from a CHUGD invocation are in the same web server directory.

CHUG generally works well, runs quickly, and doesn't leave too much trash lying about. Besides the HTML output, CHUG also creates files with filetype F1 and G1. These are vestiges of the PC tool mentioned earlier, but they can be useful to understand results without sending the HTML to a web server. The F1 file is a very abbreviated results file, the G1 file is everything recorded by AHDLDSF. CHUG also prints each line of the script as the test progresses. Note that progress can seem irregular as sometimes CHUG waits, looking for expected output, while other times it is able to move swiftly through the script. One major gotcha is that there is no convenient way to interrupt CHUG. If the test is stopped in progress (e.g. using "HX"), you will probably need to IPL CMS to allow AHDLDSF to function again. Also, CHUGD EXEC expects the target test UserID will begin in a logged off, or at least disconnected, condition. If it is already logged on connected, CHUGD will make several futile attempts at logon before giving up. SHRUG's operation is analogous.