Differences

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

Link to this comparison view

Next revision
Previous revision
user_defined_trigger [2020/04/26 03:33]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-=====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|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.