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
sequence_mode [2017/12/22 02:30]
admin [Sequence Mode]
sequence_mode [2021/01/05 03:00] (current)
Line 1: Line 1:
-===== Sequence Mode =====+===== Sequence Modes (Sequencers) =====
  
 //Sequence Mode// is the test case generation algorithm used to generate test cases and test sequences from the model. //TestOptimal// supports several algorithms ranging from random walk to optimal sequencer and custom test case generation.  //Sequence Mode// is the test case generation algorithm used to generate test cases and test sequences from the model. //TestOptimal// supports several algorithms ranging from random walk to optimal sequencer and custom test case generation. 
  
-There are two ways to select the //Sequence Mode// for model execution. +//TestOptimal// supports sequencers to generate test sequences or test cases from the model. All of them can be used for both //Online MBT Testing// and //Offline MBT Testing//.  
-  * [[mbt_node | MBT Setting]] - sets the default sequencer for the model. +
-  * [[mark_mode | Marked Only Execution]] - sets the sequence mode for the next model execution through IDE.  This setting overrides the setting in [[mbt_node |MBT Setting]]. +
- +
----- +
-==== Sequencer Overview ==== +
- +
-//TestOptimal// supports //7// test sequencers to generate test sequences or test cases from the model. All of them can be used for both //Online MBT Testing// and //Offline MBT Testing//.  +
  
 Depending on your testing objective, some sequencers may produce better or more desirable test cases from your model than others. You should experiment with these sequencers for each model to determine which sequencer meets your needs better. Depending on your testing objective, some sequencers may produce better or more desirable test cases from your model than others. You should experiment with these sequencers for each model to determine which sequencer meets your needs better.
Line 17: Line 10:
 ==== Optimal Sequencer ==== ==== Optimal Sequencer ====
  
-//OptimalSequencer// generates the //optimal// test sequence that covers all of the transitions (links and buttons) in the model.  //OptimalSequencer// implements modified algorithm for //Chinese Postman Problem// to generate test sequence from the model (graph)The //optimal// here has several meanings: +//Optimal Sequencer// generates the test sequence with minimal number of steps that covers all of the transitions in the model by applying //Chinese Postman Problem//.
-  * shortest test steps, yet cover all transitions in the model +
-  * highest weight (risk factor), yet cover all transitions in the model +
-  * shortest test duration based past execution, by avoiding slower transitions yet cover all transitions in the model+
  
-If used with //Marked// mode, it will generate test sequence to cover the //marked// states and transitions+If used with //Mark// mode, it will generate test sequence to cover currently //marked// states and transitions.
- +
---- +
-==== Radom Sequencer ==== +
- +
-//RandomSequencer// also known as //Markovian Chain// generates test sequence by walking the model randomly.  The transitions are selected for traversal based on the assigned weight.  The higher the weight is, the more often it will be traversed. +
- +
-This sequencer is very effective for online testing (test automation). It continuously generates test sequence until a stop condition is met.  This is typically used for load and stress testing and finding defects caused by long running system like memory leak or deadlock situation.+
  
 ---- ----
-==== Greedy Sequencer ==== +==== Random Sequencer ====
-//GreedySequencer// is similar to //RandomWalk// except that it prefers un-traversed transitions over already traversed transitions, as the result it can achieve better coverage of the model more quickly.  However it can also be used to generate test sequence continuously.+
  
----- +//Random Sequencer// generates test path by walking the model randomly.  The transitions are selected for traversal based on the assigned weight.  The higher the weight, the more often will it be traversed.
-==== PathFinder ====+
  
-//PathFinder// generates the test sequence using //Genetic Algorithm (GA)// to achieve more extensive coverage of different variations. The test paths generated by //PathFinder// generally provides better coverage than [[http://users.csc.calpoly.edu/~jdalbey/206/Lectures/BasisPathTutorial/| Basis Path algorithm]].+This sequencer is very effective for online testing (test automation). It continuously generates test sequence until a stop condition is met.  This is typically used for load and stress testing to find defects caused by long running system like memory leak or deadlock situation or simulate production load.
  
 ---- ----
-==== Priority Path ====+==== PriorityPath Sequencer ====
  
-//PriorityPath// generates the test sequence consisting of many short paths (test cases) to cover the transitions with higher weight (higher risk) first.  If used with //Marked// mode, it will generate test sequence to cover the //marked// states or transitions, again higher weight transitions will be covered first.+//PriorityPath Sequencer// generates many short paths (test cases) to cover the transitions with higher weight (higher risk) first.  
  
 The default transition weight is 5.  It is recommended that high priority transitions be assigned a value at least 10 for small models and much larger value for larger models.   The default transition weight is 5.  It is recommended that high priority transitions be assigned a value at least 10 for small models and much larger value for larger models.  
Line 51: Line 32:
  
 ---- ----
-==== MCaseOptimal ==== +==== MCase Sequencer ====
- +
-//MCaseOptimal// generates the shortest test sequence to cover all of the transitions in [[mCaseNode|MCases]]. The test steps defined in each MCase need not be consecutive or in any order, the system will find the optimal way to fill the gap with transitions from the model. +
- +
----- +
-==== MCaseSerial ==== +
- +
-//MCaseSerial// generates the test steps to cover all transitions in [[mCaseNode|MCase]] in the order the transitions are listed within [[mCaseNode|MCase]]. +
- +
- +
----- +
-==== Marked Only Optimal ==== +
- +
-//MarkedOnlyOptimal// generates the shortest test sequence to cover the states and transtions that are //marked// The states and transitions marked may not be adjacent. However, the generated test sequence will most likely not follow the order the states and transitions are marked. Use this sequencer to generate custom test cases. Note //marked// states will have all of its incoming and outgoing transitions covered.   +
- +
----- +
-==== Marked Only Serial ====+
  
-//MarkedOnlySerial// is similar to //MarkedOnlyOptimal// except that the sequencer will attempt to preserve the order the state and transitions are marked.  Another difference is that it will only cover each //marked// state once and repeat if necessarybut will not try to cover all of the incoming and outgoing transitions like //MarkedOnlyOptimal// sequencer+//MCase Sequencer// generates the shortest test sequence to complete the navigation path described for each //MCase//. The navigation steps defined in each MCase need not be consecutivethe system will find the shortest path to fill the gap with transitions from the model.
  
 ---- ----
-==== Choosing Sequencer ====+==== Choosing Right Sequencer ====
  
-Different sequencer produces test sequence or test cases achieving different effects on test coverage.  You should evaluate them and determine which sequencer is a better choice for each model and test objective.  Keep in mind that you may change the sequencer anytime.+Different sequencer produces test sequence or test cases resulting in different effects on test coverage.  You should evaluate them and determine which sequencer is a better choice for each model and test objective.  Keep in mind that you may change the sequencer anytime.
  
-For example if your goal is to ensure all links and buttons are tested, //OptimalSequencer// may be the best sequencer for the model as it produces the least number of test steps to cover the entire model which means that you will finish the test execution in least amount of time.+For example if your goal is to ensure all transitions are tested, [[#Optimal Sequencer]] or [[#PriorityPath Sequencer]] may be the best choice as it produces the least number of test steps to cover the entire model.
  
-If you are looking for testing different variations and paths of the model, then //PathFinder//, //RandomSeqencer// or //GreedySequencer// may suit your needs better.+If you are looking for testing different variations and paths of the model and expose AUT to long running scenarios, then [[#Random Seqencer]] may suit your needs better.