TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


User Defined Trigger

Triggers are the program which you write for test automation or output test steps. These triggers can be system triggers like onentry, action, and verify.

Define Trigger

You can define your own triggers for the state, transition or as an MBT trigger. These triggers can then be called or invoked with a simple mscript function $execTrigger('triggerName').

Calling Trigger

Triggers can be nested called, i.e. trigger A calls trigger B which calls trigger C. Loop back call is allowed i.e. trigger A calls trigger B which calls trigger A. However caution must be taken to ensure such loop back call does not result in infinite loop. To do that, you must wrap the trigger call in an if tag to provide a way to break out the loop.

You may use the Trigger Call Hierarchy Diagram to help identify if you have such loop back trigger.

Naming Trigger

User triggers must have unique name within the context: state, transition or MBT. You may use the same trigger name for triggers in different state or transition.

System first tries to locate the trigger within current state or transition. If it is not found, it will try to locate the trigger in MBT context.

user_defined_trigger.txt · Last modified: 2016/09/22 02:36 (external edit)