TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


agent_integration_process

This page describes the different integration processes for integrating with existing test automation tools and test frameworks to allow you to test any type of applications from TestOptimal.

The integration processes are categorized as follows based on who you would like to see driving/initiating the model execution:

Driver Process allows agent to initiate the model execution remotely while Agent Process assumes that the model is already started on TestOptimal server and thus it just needs to attach itself to the executing model. Details are described in the following.

Driver Process:

  1. start model execution on server: /MbtSvr/app=client&action=exec&userid=xxx&password=yyy&model=zzz
  2. wait n seconds for model to start (should make it changeable by user)
  3. attach to model (obtain agent id): /MbtSvr/app=agentsvc&action=regAgent&mbtFile=zzz
  4. loop until return empty string: /MbtSvr/app=agentsvc&action=nextCmd&agentID=aaa
    • first cmd is: launchApplication
    • pass execution rseult in result=xyz
    • pass execution status in status=pass or fail
    • last cmd is: abortAUT
  5. stop model execution: /MbtSvr/app=client&action=stop
  6. retrieve execution summary: /MbtSvr/app=client&action=summary
  7. save the execution stats: /MbtSvr/app=client&action=saveStat&desc=sometext
  8. close model: /MbtSvr/app=client&action=close

Agent Process:

  1. assume model has been started on TestOptimal server
  2. attach to model (obtain agent id): /MbtSvr/app=agentsvc&action=regAgent&mbtFile=zzz
  3. loop until return empty string: /MbtSvr/app=agentsvc&action=nextCmd&agentID=aaa
    • first cmd is: launchApplication
    • pass execution rseult in result=xyz
    • pass execution status in status=pass or fail
    • last cmd is: abortAUT
  4. exit agent executable

Using the above two processes, you can develop three types of integrations:

  1. Standalone - Interactive mode (running agent in a remote host):
    • Button Execute Model
      • follow Driver Process
    • Button Attach To Model
      • assume model has been started on TestOptimal server
      • follow Agent Process
      • this option allows running multiple agents against (attach to) the same model,
    • When either button is clicked, both button should be grayed out (inactivated) until the process is completed
  2. Standalone - Batch/Script mode (running agent in a remote host):
    • Execute model, specify server, port, model, user, password
      • follow Driver Process
      • exit agent executable when agent completes (nextCmd = blank or abortAUT() is received)
    • Attach agent to model, specify server, port, model, user, password
      • follow Agent Process
      • exit agent executable when agent completes (nextCmd = blank or abortAUT() is received)
  3. Integrated mode (start/stop of agent executable is controled by TestOptimal server):
    • TestOptimal server executes the model with plugin specifica for the agent
    • Plugin uses JNI or Runtime to start agent module/executable with the following parameters: server, port, modelName
    • Agent starts and initializes
    • Agent follows Agent Process
    • Agent exits upon receiving blank or abortAUT() cmd

You may choose one type of integration and implement it at the first and add implementations for other types of integration based on your needs.

agent_integration_process.txt · Last modified: 2016/09/22 02:35 (external edit)