Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:state_modeling [2020/06/07 21:09]
admin [Create Initial / Final Nodes]
tutorial:state_modeling [2021/01/05 03:00]
127.0.0.1 external edit
Line 1: Line 1:
 ====== Tutorial: State-based Modeling and Test Generation ====== ====== Tutorial: State-based Modeling and Test Generation ======
  
-Learning Objectives:+====Learning Objectives ====
   * [[#What is a State Model]]   * [[#What is a State Model]]
   * [[#Create Model]]   * [[#Create Model]]
Line 48: Line 48:
 Our goal is to create a simple model that looks like the following when completed: Our goal is to create a simple model that looks like the following when completed:
  
-{{wiki:overview:ide_new_model_example.png?600}}+{{wiki:overview:tut_new_model_state_trans_created.png?600}}
  
  
Line 77: Line 77:
 When done, close the property pane by clicking on ">" on the right side of the pane. When done, close the property pane by clicking on ">" on the right side of the pane.
  
-Nodes, states and transitions can be deleted by one of the following: +If needed, nodes, states and transitions can be deleted by clicking on "X" on the context menu.
-  * clicking on "X" in the context menu, or +
-  * select //mark mode// by clicking ☆ on toolbar, click on nodes, states and transitions you wish to delete and click on "X" on toolbar +
- +
-You may also use //lasso// feature to select nodes and states by drag a rectangular area.  //IDE// will auto-switch to //edit mode//.+
  
  
Line 124: Line 120:
 Transition label can also be moved by dragging on {{wiki:overview:ide_model_icon_move.png?16}}. Transition label can also be moved by dragging on {{wiki:overview:ide_model_icon_move.png?16}}.
  
 +Be sure to save the model changes before moving on to next.
  
  
Line 132: Line 128:
  
 ===== Generate Test Cases ===== ===== Generate Test Cases =====
 +When model is completed, we are ready to generate test cases from it.  Test cases are generated by traversing the states and transitions to achieve the desired coverage using algorithms, aka model //sequencers//
  
 +For purpose of this demonstration, we'll just use the default //Optimal// sequencer as shown in the app toolbar {{wiki:idescreen:ide_model_toolbar.png?300}}.
  
-===== Make Changes =====+Click on {{wiki:overview:tut_model_btn_gen.png?16}} on the app toolbar to generate the test cases using //Optimal// sequencer.
  
 +You should see some status messages showing up on the bottom of the screen. When done, it should auto select //RESULT// tab like below, if not click on //RESULT// tab on the app header:
 +
 +{{wiki:overview:tut_new_model_result_gen.png?600}}
 +
 +Explanation on //RESULT// tab is covered in a separate tutorial.  We will just review the test cases generated in the "Test Case" section.
  
  
 ===== Model Graphs and Test Visualization ===== ===== Model Graphs and Test Visualization =====
 +In addition to the test case list described in the previous section, you can view the test cases in graphs:
 +  * {{wiki:overview:tut_new_model_graph_trav.png?linkonly | Traversal}}
 +  * {{wiki:overview:tut_new_model_graph_cov.png?linkonly| Coverage}}
 +  * {{wiki:overview:tut_new_model_graph_msc.png?linkonly | Test Case}}
 +
 +Click on each of the graphs on {{wiki:overview:tut_model_btn_graphs.png?250}}. 
 +
 +The graphs should be self-explanatory.
 +
 +===== Make Changes =====
 +As you followed this tutorial, you should have noticed that you can easily make changes to the model and re-generate test cases with minimum effort.
 +
 +Here are a few more changes you can make to the model:
 +  * aligning states by selecting (marking) states and clicking on one of the alignment options from the toolbar
 +  * re-routing transitions with transition context menu:
 +    * {{wiki:idescreen:ide_model_btn_reroute_1.png?16}} - refreshing transition segments
 +    * {{wiki:idescreen:ide_model_btn_reroute_2.png?16}} - changing transition source and/or target state
 +  * refreshing all outgoing and incoming transitions of a state with state context menu {{wiki:idescreen:ide_model_btn_reroute_1.png?16}}
 +  * styling the states and transitions through [[../ide_model#state_properties|State Properties]] and [[../ide_model#transition_properties | Transition Properties]].
 +
 +You may also us //Box// node to group or highlight a set of states.
  
 +If you are modeling a workflow or process, you can use //Swimlanes// to distinguish multiple different process and actor.