h1. YAKINDU Statechart Tools – Testcase 03 - Simulation |_. Nr |_. Testname |_. Test Instructions |_. Postconditions |_. Status| | 3.1 | Run Configuration |
Select the _TestProject_ project.
Select *Run → Run Configurations…*.
Select _Statechart Simulation_.
Click on the *New* button (upper left corner).
Click on the _Search_ button.
Begin to type @Staircase@ into the _Select a resource to open_ field.
As soon as _Staircase.sct_ appears, select it.
Click on the *OK* button.
Click on the *Apply* button to save the settings.
Click on the *Run* button to start simulation.
In the _Simulation_ view, expand the entries in the _Name_ column.
The _SC Simulation_ perspective is activated.
State *LightOff* is highlighted (red).
The _Simulation_ view displays the variable _light_ (value _false_), the _keypress_ event, and the time event.
| %{color:red}open% | | 3.2 | Change the state | Click on the event _keypress_ in the _Simulation_ view. |State *LightOff* is dehighlighted.
State *LightOn* is highlighted (yellow).
The transition from *LightOff* to *LightOn* is colored orange.
Variable _light_ is set to true.
After 30 seconds state *LightOff* and it's incoming transition become highlighted, while *LightOn* and its incoming transactions become unhighlighted.
Variable _light_ is set to _false_.
The simulation is stopped.
No state is highlighted.
The perspective has changed from _SC Simulation_ to _SC Modeling_.
Make a new transition from *LightOff* to *LightOn*.
In _Window → Preferences → YAKINDU SCT → Diagram appearance_ enable _Show transition priority_.
Click *OK*.
Click on the *Run* button twice to start two parallel simulations.
Select the first simulation in the _Debug_ view.
Click on the *Suspend* button (yellow stripes) at the top of the _Simulation_ view.
Select the second simulation in the _Debug_ view.
Click the *Terminate* button (red square) at the top of the _Simulation_ view.
Reselect the running simulation in the _Debug_ view
If the view has changed, open the _Simulation_ view
Check if the first simulation is still suspended - *Resume*, *Terminate* and *Skip Over* buttons at the top of the _Simulation_ view are active.
Click on the event _keypress_ in the _Simulation_ view.
Check if the simulation was not affected by the event
Click on the *Step Over* button (yellow arrow)
Check if the simulation has cycled one step further and the _keypress_ event has been performed.
If there is a timebased outgoing transition from the current active state, wait until the transition would be performed. Check if the transition is not automatically triggered.
Click on the *Suspend/Resume* button (yellow/green triangle) to continue the simulation
The first simulation in the _Debug_ view is resumed and active.
The debug states of the first simulation can be changed by interacting with the buttons at the top of the _Simulation_ view.
The second simulation in the _Debug_ view is terminated.
The debugging actions in the _Simulation_View_ have the same behaviour as the actions in the _Debug_ view.