TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


State/Node Property

»Model Editor State Context Menu: State Property

Each State/Node in the model has a set of properties which are displayed or edited in State/Node Property.


Property Description

A state usually represents a web page or a web page. To create a state, right mouse click on modelNode and select “New State”. Fill in the properties in Property Tab as described below.

  • State ID - required, a unique identifier you assign to this state. It must be unique for the entire model (all states including children states). It can not contain any spaces, dash “-” or any characters that are not valid for a java method name.
  • Description - a freetext description to document what this state is about or represents.
  • Initial State - required, to specify if this state is an initial state of your model, this is usually the first login page or welcome page of your application. There should only be one initial state for each model and each super state/submodel. Initial state is shown with a double ellipse.
  • Final State - required, to specify if this state is a final state for the model. There should only be one final state within each super state/submodel so that you can control where your testing will end at. The final state is shown with a double octagon.
  • Tags - requirements id or any identifier for requirements traceability. Stats (traversal and pass/failure) are automatically collected. If the state has tags entered, a link “show tags” will appear next to this field.
  • Assert ID - the defect identifier to be used to raise the defect in ALM when the state failed, requires ALM plugin and configuratio.
  • Reset URL - for web applications to be used to load the web page when the testing script failed. This allows the testing to continue from the correct page.
  • Entry Delay(ms) - number of milliseconds to delay before executing the onEntry trigger.
  • Sub Model Name - optional, sub-model attached to this state. (new in release 3.0)
  • Sub Model Prefix - optional, a prefix to be added to all sub-states to ensure the state id are unique within the current model.
  • Sub Model Filter - optional, filter sub model states and transitions by state/transition id (exact match or regular express) or stereotype. For example. mcase(mcasName); removeState(stateid); optionalState(stateid); removeTrans(transid); optionalState(tranid); traverseTimes(transid, n). You may use regular expression to match state/trans id by pre-fixing regular expression with “/” character (note “/” character will be removed before performing regular exprsesion match).
  • Sub Model Sequencer - optional, select a sequencer to be used to generate test cases for the sub model. Leave it blank to use main model's sequencer.
  • Pass-Through SubModel - Yes/No, if each pass through sub model must exit back to the main model. You must set the Traversal Times property for the incoming transition into the sub model state accordingly to achieve the sub model traversal.
  • Color - optionally you can choose a background color for this state on the graph.
  • Activate Type - type of condition when state is activated. This is for Enterprise Edition only. Select from the following options:
    • Traversal Count - activates when expected number of transition traversals is reached (Activate Threshold)
    • Transition Count - activates when expected number of distinct transitions are traversed (Activate Threshold)
    • By setting path var _activateState - activates when the path variable _activateState is set to non-blank value. This path var is reset to blank after each state activation.
    • Sum of transition weights - activates when sum of the weights from the transition traversals reaches the Activate Threshold.
  • Activate Threshold - threshold value for Activate Type. This is for Enterprise Edition only.
  • Trigger Trans - how transitions is/are triggered when the state is activated. This is for Enterprise Edition only:
    • Random - randomly select one transitions\ from all outgoing transitions. Transitions must have guard conditions evaluated to true if guard conditions are defined.
    • All - all transitions are triggered
    • Set by _triggerTransName - name of the transition to be triggered is specified in the path variable _triggerTransName

Click on the button “OK” to save the changes.

statenode.txt · Last modified: 2017/12/21 04:44 by admin