This is an old revision of the document!
Remote Command Plugin
Provides a remote interface to allow MScript method $remoteCmd() to send a remote command to external test automation tools or custom testing agent. You can call $remoteCmd() from the MScript as well as in java handler.
Use Case of Remote Command Plugin
By using Remote Command Plugin, any external tool that supports http request can be integrated with TestOptimal MBT. Your remote application will receive commands from your models/MScript as you execute your models and can execute them against AUT and return the execution results back to your model/MScript to be assessed for success or failure.
Agent Command Sequence
The following are the http commands supported:
- Obtain agent id which will be used in all subsequent requests.
http://localhost:8888/MbtSvr/app=agentsvc&action=regAgent&mbtFile=xxx Return: localhost:6049
- retrieve remote command from the Model/MScript
where "status" and "result" parameters are the results of the last remote command execution. That is, when you get the next remote command, you are sending the execution results of the last remote command at the same time. The "status" can be: SUCCESS or FAIL The "result" is the execution result in text to be returned to your //$remoteCmd()// call in MScript.
MScript Examples
Here are two MScript tags that calls “$remoteCmd(…)”:
<assert value1="$remoteCmd('getTitle()')" op="eq" value2="Login Page"/> <action code="$remoteCmd('selectOption(\'dropdownList1\', \'option2\')')" />
Your remote agent will receive these remote commands:
getTitle() selectOption('dropdownList1','option2')
More Plugin Info
This plugin is different from RemoteTriggerPlugin which sends event trigger (traversing state/transition) instead of remote commands generated by $remoteCmd() method you coded in MScript for the model.
Additionally the remote agent callback to the server to retrieve data: dataset, user var and system var.