Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
remotecommandplugin [2017/04/01 03:40] – admin | remotecommandplugin [2020/05/04 18:45] (current) – removed admin |
---|
===== 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. | |
| |
Any external tool that supports http request can then be integrated with //TestOptimal// MBT execution by obtaining test sequence commands generated from your MBT model/MScript and execute them on AUT. | |
| |
The following are the http commands supported: | |
| |
* [[http://localhost:8888/MbtSvr/app=agentsvc&action=regAgent&mbtFile=xxx|http://localhost:8888/MbtSvr/app=agentsvc&action=regAgent&mbtFile=xxx]] - to obtain the agent id. The agent id obtained is then used in all subsequent requests. | |
Return: localhost:6049 | |
| |
* [[http://localhost:8888/MbtSvr/app=agentsvc&action=nextCmd&agentID=localhost:6049&status=SUCCESS&result=yourText|http://localhost:8888/MbtSvr/app=agentsvc&action=nextCmd&agentID=localhost:6049&status=SUCCESS&result=yourText]] - to obtain the next test sequence command when the last command has been executed. Two parameters in this url: "status" to indicate the remote execution status (SUCCESS, FAIL) and "result" to return the execution result. The "result" value is then passed back to your MScript //$remoteCmd()// call. For example: | |
| |
<assert value1="$remoteCmd('getTitle()')" op="eq" value2="Login Page"/> | |
| |
Another example, the following MScript will send a remote command //selectOption// to the agent from MScript: | |
| |
<action code="$remoteCmd('selectOption(\'dropdownList1\', \'option2\')')" /> | |
| |
In your agent, it will receive this remote command: | |
| |
selectOption('dropdownList1','option2') | |
| |
This plugin is different from [[RemoteTriggerPlugin|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 Action|remote agent callback]] to the server to retrieve data: dataset, user var and system var. | |
| |
| |
| |
| |