h1. YAKINDU Statechart Tools – Testcase 03 - Simulation |_. Nr |_. Testname |_. Test Instructions |_. Postconditions |_. Status| | 3.1 | Run Configuration |
  1. Select the _TestProject_ project.

    Select *Run → Run Configurations…*.

  2. Select _Statechart Simulation_.

  3. Click on the *New* button (upper left corner).

  4. Click on the _Search_ button.

  5. Begin to type @Staircase@ into the _Select a resource to open_ field.

  6. As soon as _Staircase.sct_ appears, select it.

  7. Click on the *OK* button.

  8. Click on the *Apply* button to save the settings.

  9. Click on the *Run* button to start simulation.

  10. In the _Simulation_ view, expand the entries in the _Name_ column.

| The simulation is started.

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. | | %{color:red}open% | | 3.3 | Stop the simulation | Click the *Terminate* button (red square) to stop the simulation. | | %{color:red}open% | | 3.4 | Check transition priorities |
  1. Make a new transition from *LightOff* to *LightOn*.

  2. In _Window → Preferences → YAKINDU SCT → Diagram appearance_ enable _Show transition priority_.

  3. Click *OK*.

| The transitions with *LightOff* as their source state now have little numbers at the start of the transitions arc, indicating their respective priorities. | %{color:red}open% | | 3.4.1 | Check transition priorities | Delete the transition created in 3.4. | The transition is removed. | %{color:red}open% | | 3.5 | Start a second simulation |
  1. Click on the *Run* button twice to start two parallel simulations.

  2. Select the first simulation in the _Debug_ view.

  3. Click on the *Suspend* button (yellow stripes) at the top of the _Simulation_ view.

  4. Select the second simulation in the _Debug_ view.

  5. Click the *Terminate* button (red square) at the top of the _Simulation_ view.

  6. Reselect the running simulation in the _Debug_ view

  7. If the view has changed, open the _Simulation_ view

  8. Check if the first simulation is still suspended - *Resume*, *Terminate* and *Skip Over* buttons at the top of the _Simulation_ view are active.

  9. Click on the event _keypress_ in the _Simulation_ view.

  10. Check if the simulation was not affected by the event

  11. Click on the *Step Over* button (yellow arrow)

  12. Check if the simulation has cycled one step further and the _keypress_ event has been performed.

  13. 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.

  14. Click on the *Suspend/Resume* button (yellow/green triangle) to continue the simulation

| | %{color:red}open% |