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
.batfile on Windows, make sure that it does not echo anything! This can be achieve by using as first line:
- Enter the path to the specification file in
Config Itemstext field
(or use the
Browsebutton; make sure it shows
All supported Formats)
- Select implementation type:
real program, communicating labels on stdin/stdout
program+args, for example:
java -classpath "J:\ex\fwgc\impl\correct" practicum.Practicum
java -classpath "/path/to /ex/fwgc/impl/correct" practicum.Practicum
Note: on windows the double quotes are needed
(typically 1 or 2 seconds, but this of course depends on your program)
- Select the right
interpretationfor your model
- Select traces kind: Straces or Utraces.
- Select the Test tab.
- Optionally, choose your own random number Seed.
- Press the Start button - it will show Stop, and a Log pane will appear.
- Use the buttons in the Next test step(s) pane to execute test steps.
- Press the Stop button when you are done.
- 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