Testing a program that communicates using labels on standard input and standard output


  • for the current version of JTorX (1.9.0) it is very important that the program writes only labels to standard output.
    JTorX will crash when it receives a line that is empty or only contains spaces or tabs!
  • When using a .bat file on Windows, make sure that it does not echo anything! This can be achieve by using as first line:
    @echo off


  1. Enter the path to the specification file in Config Items text field Model
    (or use the Browse button; make sure it shows All supported Formats)
  2. Select implementation type: real program, communicating labels on stdin/stdout
    3. Enter program+args, for example:
    On windows: java -classpath "J:\ex\fwgc\impl\correct" practicum.Practicum
    On linux: java -classpath "/path/to /ex/fwgc/impl/correct" practicum.Practicum
    Note: on windows the double quotes are needed
  3. Choose Timeout value and timeout unit
    (typically 1 or 2 seconds, but this of course depends on your program)
  4. Select the right interpretation for your model
  5. Select traces kind: Straces or Utraces.
  6. Select the Test tab.
  7. Optionally, choose your own random number Seed.
  8. Press the Start button - it will show Stop, and a Log pane will appear.
  9. Use the buttons in the Next test step(s) pane to execute test steps.
  10. Press the Stop button when you are done.
  11. You may want to close the Log panes when you are done.


  • unfortunately it is not yet possible to specify in JTorX the working directory from which the program must be run.
  • in the program+args line, the command line arguments can be added, like e.g.
    On windows: java -classpath "J:\ex\fwgc\impl\correct" practicum.Practicum 5000
    On linux: java -classpath "/path/to /ex/fwgc/impl/correct" practicum.Practicum 5000

Back to Usage scenarios