TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


Remote Trigger Plugin

Remote Trigger Plugin automatically sends the state and transition traversal event triggers to the remote agent as MBT model is being executed.

MScript Functions


Upon receiving the state and transition traversal event triggers, the remote agent then performs the action accordingly. After the action is performed, the agent responds to the server with the execution result and obtains next state and transition traversal event trigger.

Remote Agent

The remote agent can be written in any programming language which supports http requests. That is, if you can call an url and parse the result returned from a remote web server, you can write the remote agent.

Below is a pseudo code for a typical remote agent:

  • on start up, call TestOptimal to obtain the agent id
  • obtain the first trigger from the server.
  • loop until no more triggers returned from the sever
    • perform the action for the trigger received
    • obtain the next trigger from the sever
  • end-loop
Return: localhost:6049

You may pass FAIL for “status” param which will cause the state/transition to fail and the value in “result” param will be the exception message.

 Return from "nextCmd":
  • MBT_start()
  • MBT_end()
  • onException()
  • onError()
  • mCaseName_setup()
  • mCaseName_cleanup()
  • state1_onentry()
  • state1_onexit()
  • trans1_prep()
  • trans1_action()
  • trans1_verify()

More Plugin Info

By default, this plugin is different from RemoteCommandPlugin which allows you to send a specific command to the remote agent instead of the the triggers that correspond to the traversing of states and transitions. However, you can use this plugin to also run mScript like RemoteCommandPlugin by following the instruction described in RemoteCommandPlugin.

Additionally you may have remote agent callback to the server to retrieve data: dataset, user var and system var.

remotetriggerplugin.txt · Last modified: 2017/10/29 17:44 by admin