h1(#Test2). Yakindu SCT Testcase 02 - Editor


|_. Nr |_. Testname |_. Test Instructions |_. Postconditions |_. Status|
| 2.1 | Create a Java project | Click on *File->New->Java Project*<p>Enter *TestProject* as new project name</p><p>Click on *Finish* button to create the project</p> | An new project TestProject is created in the workspace | %{color:red}open% |
| 2.2 | Create a statechart | Press *Ctrl-N* to open the New Wizard<p>Expand the *YAKINDU SCT* tree entry and select *Statechart Model*</p><p>Click on *Next*</p><p>Enter Staircase.sct as name and click on *Finish* button to create the statechart</p> | Confirm Perspective Switch dialog opens | %{color:red}open% |
| 2.3 | Complete statechart creating | In the Confirm Perspective Switch dialog, click *Yes*. | A file named Staircase.sct is created and is shown in project explorer.<p>The statechart editor displays the definition section (left), the statechart model (center), and the Palette (right).</p><p>The statechart contains a region named "main region". That region contains an entry state and a transition leading to state "StateA".</p><p>There are no warning or error markers.</p><p>The Problems view contains no entries.</p><p>The Palette contains various tools, like "Transition", "State" etc.</p> | %{color:red}open% |
| 2.4 | Open Properties View | Do a right click on the state to open the context menu Select *Show Properties View* | The properties view is opened displaying the selected state's properties | %{color:red}open% |
| 2.5 | Change state name | Enter LightOff as new “State name:” in properties view Press tab to change focus | The state's name changes to LightOff | %{color:red}open% |
| 2.6 | Create a new state | Click on the state icon in the tools palette<p>Click inside the region to insert a new state</p><p>Change the state's name to LightOn</p> | A state named. LightOn is created in the region. The new state has an error marker, and there's an error entry in the Problems view. The error message reads "Node is not reachable due to missing incoming transition". | %{color:red}open% |
| 2.7 | Create a variable and an event | Enter the following code into the Statechart Specification Element, overriding any existing contents:<p></p><pre><p>	@internal:@<br>	@var light : boolean@<p>	@interface:@<br>	@in event keypress@</pre> | There are no specification errors. | %{color:red}open% |
| 2.8 | Add actions to states | Enter the following code into the state specification of the LightOff state, overriding any existing contents:<p>&emsp;@entry / light = false@</p><p>Enter the following code into the state specification of the LightOn state, overriding any existing contents:</p><p>&emsp;@entry / light = true@</p>| There are no specification errors. | %{color:red}open% |
| 2.9 | Create Transitions | Click on the *Transition* icon in the palette view. Click+hold on the LightOff state, drag the mouse to the LightOn state, and release the mouse button. Enter event keypress as trigger. Create a second transition from the LightOn to the LightOff state. Enter after 30s as trigger. | A new transition with trigger keypress is created. A new transition with trigger after 30s is created. | %{color:red}open% |
| 2.10 | Add additional elements |Add elements of the following types to the main region:<p>&emsp;- Composite State<br>&emsp;- Orthogonal State<br>&emsp;- Shallow History<br>&emsp;- Deep History<br>&emsp;- Final State<br>&emsp;- Exit Node<br>&emsp;- Choice<br>&emsp;- Synchronization | Check whether each element is drawn correctly (size, color, appearance etc.).<p>Check whether error markers are set correctly, e.g. incoming transitions or names are missing, "Duplicate NamedElement 'xyz' in Region 'main_region'".</p> | %{color:red}open% |
| 2.10.1 | Naming | Change the name of: initial entry, shallow history, deep history and exit nodes. | The names appear beside or below of the respective elements. | %{color:red}open% |
| 2.11 | Copy & paste state | Select a state<p>Select *Edit->Copy* (CTRL+C) to copy the state</p><p>Select the main region</p><p>Select *Edit->Paste* (CTRL+V) to paste a copy of the state to the main region</p> | A copy of the state with a synthetic name is added to the main region. The copy includes copies of the local actions, regions etc. of the copied state. | %{color:red}open% |
| 2.12 | Copy & paste region | Select the main region<p>Select *Edit->Copy* (CTRL+C) to copy the region</p><p>Select the diagram canvas</p><p>Select *Edit->Paste* (CTRL+V) to paste a copy of the region to the canvas</p> | A copy of the region with a synthetic name is added to the diagram canvas. The copy includes copies of everything included in the copied region. | %{color:red}open% |
| 2.13 | Delete & paste state | Select a state<p>Select *Edit->Cut* (CTRL+X) to delete the state</p><p>Select the main region</p><p>Select *Edit->Paste* (CTRL+V) to paste a copy of the state to the main region</p> | The selected state is deleted.<p>A copy of the deleted state is added to the main region. The copy includes copies of the local actions, regions etc. of the deleted state.</p> | %{color:red}open% |
| 2.14 | Delete & paste region | Select the main region<p>Select *Edit->Cut* (CTRL+X) to delete the region</p><p>Select the diagram canvas</p><p>Select *Edit->Paste* (CTRL+V) to paste a copy of the region to the canvas</p> | The selected region is deleted.<p>A copy of the deleted region is added to the diagram canvas. The copy includes copies of everything included in the copied region.</p> | %{color:red}open% |
| 2.15 | Delete | Remove following elements from the diagram:<p>&emsp;- Copied region<br>&emsp;- Elements added in T.2.10</p> | All specified elements are removed. | %{color:red}open% |
| 2.16 | Navigator View | Enable the SC Modeling perspective. Expand the Staircase.sct file in the project explorer. | Statechart Staircase is displayed as child with an icon. | %{color:red}open% |
| 2.16.1 | Navigator View | Expand the Statechart Staircase entry in the tree view. | The two interface scopes and the region are displayed as children with icons. | %{color:red}open% |
| 2.16.2 | Navigator View | Expand the interface scope entries in the tree view. | The variables and events of the interfaces are listed as children with icons. | %{color:red}open% |
| 2.16.3 | Navigator View | Expand the region entry in the tree view. | The initial state and the LightOff and LightOn states are displayed as children with icons. | %{color:red}open% |
| 2.16.4 | Navigator View | Expand the states entries in the tree view. | The outgoing transitions of the states are displayed with icon and trigger/guard. | %{color:red}open% |
| 2.17 | View | Press *[Ctrl++]* to zoom in and *[Ctrl--]* to zoom out. | The view should zoom in and out. | %{color:red}open% |
| 2.18 | Undo & Redo | Select a region which includes at least a state with an outgoing transition <p> Press *DEL* to delete the region <p>Undo deletion by Strg+Z <p> Redo deletion by Strg+Y <p> Try to move the affected element by dragging | The deletion should properly be undone and redone<p> The elements involved during undo and redo have to be still changeable (move, delete change e.g. name) afterwards | %{color:red}open% |