- Start command line window (Start->Run, cmd.exe)
- go to "java" directory
- start another instance of cmd.exe (type "start cmd.exe")
Run Demo in Simulated time case:
- in one command line window start smart-lamp by typing:
java smartlamp/LightController -C localhost 6521 -M 0- in another command line window start TRON by typing:
..\tron.exe -Q 6521 -P 10,200 -F 300 -I SocketAdapter -v 9 LightContr.xml -- localhost 9999
Run Demo in Real time
- in one command line window start smart-lamp by typing:
java LightController/LightController -M 0- in another command line window start TRON by typing:
..\tron.exe -P 10,200 -F 300 -I SocketAdapter -v 9 LightContr.xml -- localhost 9999
To do the Light Controller Mutant exercise you need the model LightContr4.xml (which contains a simpler model not including the adapter and a sample manually constructed testcase stated as an automaton coverageuser) and the following command lines to start TRON and the controller
- >..\tron.exe -Q 6521 -P 10,200 -F 300 -I SocketAdapter -v 9 LightContr4.xml -- localhost 9999
- >java smartlamp/LightController -C localhost 6521 -M 0
You can run the mutants via the -M option, eg use -M 1 for mutant 1, and -M 2 for mutant 2
The easiest way to create you own mutants is to modify the existing LightController source and add mutants in the style of the existing mutants (a flag indicates what mutant to run, and use if(mutantID) statements to enable the faulty code. You typically need to edit the LightController.java file and Dimmer.java file. Remember to recompile the LightController:
javac -cp . LightController/*.java
(the compiler is typically installed in a directory name similarly to this: C:\Program Files\Java\jdk1.5.0_07\bin;)