Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
remotecommandplugin [2017/10/29 17:40]
admin [Remote Command Plugin]
— (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. 
- 
-[[http://testoptimal.com/javaDoc/reference/com/webmbt/plugin/RemoteCmdPlugin.html| MScript Functions]] 
- 
------- 
- 
-==== 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 
- 
-    http://localhost:8888/MbtSvr/app=agentsvc&action=nextCmd&agentID=localhost:6049&status=SUCCESS&result=resultText 
-    
-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|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. 
- 
- 
-