Integtest supports merging several event files (.dir) into a sigle control script.
It's generally easier to write short tests as .dir files, and
combine them into larger test sets in .scr files.
 
#
# Example of interaction window 
#
#######################################
# INSTRUMENTATION FOR INTEGTEST
if {[lsearch $argv -debug] != -1} {
  # Load the socket client code
  source integClient.tcl
  # Start the connection to a local instance 
  inttest::integClientOpen 127.0.0.1 3010 
}
# END OF INSTRUMENTATION FOR INTEGTEST
#######################################
# Update the displayed text in a label
   
proc updateLabel {myLabel item} {
  global price;
  $myLabel configure -text \
  "The cost for a potion of $item is $price gold pieces"
}
 
# Create and display a label
 
set l [label .l -text "Select a Potion"]
grid $l -column 0 -row 0 -columnspan 3
# A list of potions and prices
set itemList [list "Cure Light Wounds" 16 \
    "Boldness" 20 \
    "See Invisible" 60]
set position 0
foreach {item cost} $itemList {
  radiobutton .b_$position -text $item -variable price \
      -value $cost -command [list updateLabel $l $item]
  grid .b_$position -column $position -row 1
  incr position
}
After clicking a "Invoke" (the ! icon) you get this window with a tree to select the widget to receive the event.
 
If you know the application's window hierarchy, you can browse to
it easily. If you aren't certain which widget you need to select,
you can right-click on an item and it will flash green and red in
the target application.
 
) will run all the commands
in the Event Script window. After clicking the Run button 
the application behaves as if a user had clicked 
the Cure Light Wounds radiobutton.
) tests.
If your application will only be used on one platform, and maintaining consistent background colors is important, choose the colored icon. If it will run on multiple platforms, the background colors are likely to be different depending on the platform. In that case, choose the uncolored icon.
It can be frustrating to check inconsistencies that don't matter.
 Clicking a window button will bring up the same window browsing 
menu. Again, select the appropriate entry and click Done
 
) will update the 
results window like this.