Differences

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

Link to this comparison view

system_variables [2016/09/22 02:36] (current)
Line 1: Line 1:
 +===== System Variables =====
  
 +//​Testoptimal//​ exposes a set of system maintained variables to mscript. ​ These system variables describe the current state of the model execution, for example current state ID, transition ID, etc.
 +
 +The following are system variables. Do not use the same name for your user variable or data set name.
 +
 +  * AUTVersion: AUT version
 +  * curStateID: current state
 +  * curStateTravCount:​ number of times the current state has been visited (traversed)
 +  * curTransEvent:​ current transition event
 +  * curTransTravCount:​ number of times the current transition has been triggered (traversed).
 +  * curTransTags:​ requirement/​tags of the current transition
 +  * exceptionNum:​ number of exceptions so far has been triggered.
 +  * mCaseExecNum:​ number of times the current mCase has been executed.
 +  * mCaseName: name of current mCase being executed.
 +  * modelName: name of the model currently open
 +  * modelRelativePath:​ relative path for the model currently open
 +  * modelAbsolutePath:​ absolute path for the model currently open
 +  * modelDesc: model description
 +  * modelVersion:​ version number assigned to the model
 +  * prevStateID:​ previous state leading to the current state
 +  * prevTransEvent:​ the transition that led to the current state
 +  * seqNum: generated sequence number (starting at 1).
 +  * tagVersion: Version number of the requirement/​tag system
 +  * targetStateID:​ target state
 +  * threadID: virtual user thread number.
 +
 +For a complete list of system vars supported, please click [[http://​testoptimal.com/​javaDoc/​reference/​com/​webmbt/​plugin/​MbtScriptExecutor.html#​getSysVar(java.lang.String)|here]].
 +
 +System variables are retrieved by "​$getSysVar()"​ method. For example:
 +
 +    <log msg="​current trans event id is: $getSysVar('​curTransEvent'​)."/>​
 +
 +System variables can be retrieved using token syntax. For example:
 +
 +    <log msg="​current trans event id is: [curTransEvent]."/>​
 +
 +Please be aware that there is a little overhead in using token syntax.
Print/export
QR Code
QR Code system_variables (generated for current page)