Differences

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

Link to this comparison view

Next revision
Previous revision
remotecommandplugin [2016/09/22 02:36]
127.0.0.1 external edit
— (current)
Line 1: Line 1:
-===== 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|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. 
- 
- 
-