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*
Enter *TestProject* as new project name
Click on *Finish* button to create the project
| An new project TestProject is created in the workspace | %{color:red}open% | | 2.2 | Create a statechart | Press *Ctrl-N* to open the New WizardExpand the *YAKINDU SCT* tree entry and select *Statechart Model*
Click on *Next*
Enter Staircase.sct as name and click on *Finish* button to create the statechart
| 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.The statechart editor displays the definition section (left), the statechart model (center), and the Palette (right).
The statechart contains a region named "main region". That region contains an entry state and a transition leading to state "StateA".
There are no warning or error markers.
The Problems view contains no entries.
The Palette contains various tools, like "Transition", "State" etc.
| %{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 paletteClick inside the region to insert a new state
Change the state's name to LightOn
| 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: @internal:@
@var light : boolean@
@entry / light = false@
Enter the following code into the state specification of the LightOn state, overriding any existing contents:
@entry / light = true@
| 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: - Composite State
- Orthogonal State
- Shallow History
- Deep History
- Final State
- Exit Node
- Choice
- Synchronization | Check whether each element is drawn correctly (size, color, appearance etc.).
Check whether error markers are set correctly, e.g. incoming transitions or names are missing, "Duplicate NamedElement 'xyz' in Region 'main_region'".
| %{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 the a stateSelect *Edit->Copy* (CTRL+C) to copy the state
Select the main region
Select *Edit->Paste* (CTRL+V) to paste a copy of the state to the main region
| 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 regionSelect *Edit->Copy* (CTRL+C) to copy the region
Select the diagram canvas
Select *Edit->Paste* (CTRL+V) to paste a copy of the region to the canvas
| 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 the a stateSelect *Edit->Cut* (CTRL+X) to delete the state
Select the main region
Select *Edit->Paste* (CTRL+V) to paste a copy of the state to the main region
| The selected state is deleted.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.
| %{color:red}open% | | 2.14 | Delete & paste region | Select the main regionSelect *Edit->Cut* (CTRL+X) to delete the region
Select the diagram canvas
Select *Edit->Paste* (CTRL+V) to paste a copy of the region to the canvas
| The selected region is deleted.A copy of the deleted region is added to the diagram canvas. The copy includes copies of everything included in the copied region.
| %{color:red}open% | | 2.15 | Delete | Remove following elements from the diagram: - Copied region
- Elements added in T.2.10
Press *DEL* to delete the region
Undo deletion by Strg+Z
Redo deletion by Strg+Y
Try to move the affected element by dragging | The deletion should properly be undone an redone
The elements involved during undo and redo have to be still changeable (move, delete change e.g. name) afterwards | %{color:red}open% |