Proxy Launcher (proxy.jar)
One big issue in testing on distributed environments is how to "publish" scripts execution simultaneously on different components.The Proxy launcher allows spliting a test in several scripts and executing them simultaneously on different hosts.
Let's imagine you have to test a VoIP framework that comprises 3 different machines: a Client, a Gateway and a Server. To test the data flow, you will need to deploy for each test (at least) 3 scripts on each of those and run them at the same time.
The Proxy launcher is used in conjunction with a special kind of agent called the sub-agent (XSubAgent in the distribution package). A sub-agent is a very basic agent embedding an XML-RPC server and which communicates only through this media with the main agent.

or

Here is the flow in the above example:
- The test campaign in XStudio contains only one test Test1
- The test belongs to a category associated with the proxy.jar launcher
- A campaign session is created to execute the campaign on a specific XAgent and with a specific configuration for the proxy launcher.
- This configuration includes 3 sub-agents.
For each of those sub-agents, the sub-configuration include:
- the sub-agent's XML-RPC Url
- a launcher (launcher1.jar, launcher2.jar and launcher3.jar)
- a configuration
- and a script postfix (_A, _B and _C)
- The proxy launcher contacts individually and simultaneously all the sub-agents and forward the requests to execute sub-tests Test1_A, Test1_B and Test1_C
- Each sub-agent will execute its specific script and will return results to the proxy launcher. Each script can have the capability to interact/synchronize with the others as they are running simultaneously.
- The proxy launcher consolidates all the results and logs and returns it to XStudio.
Hence, one single test is split by the proxy launcher in different scripts that are executed simultaneously on different XSubAgents located on the Client, the Gateway and the Server of our VoIP Framework.
Configuration
Theproxy.xml file allows pre-configuring the launcher with some default values:| Parameter | Description |
| SubAgent | |
| XML-RPC URL | This must indicate the url of the SubAgent. Default value is: http://localhost:8282
|
| Launcher | This must indicates which launcher the sub-agent will need to use to execute its script.
Default value is: random.jar
|
| Configuration | This must indicate which configuration the sub-agent will need to use to execute its script. Default value is: default
|
| Script postfix | This must indicate the postfix used to determine the name of the script to run by the sub-agent. If the test name is Test1 and we configure this parameter to _agent1.py, then the script that the sub-agent's launcher will get and execute is Test1_agent1.py Default value is: _agent1
|
These values can be changed while creating the campaign session from XStudio.
XSubAgent
XSubAgent is included in the XAgent package.XSubAgent embeds an XML-RPX server and is listening by default on port 8282 but you can specify another port by adding to the command line
--port <port>
Limitations
- Conversely to the standard XAgent, there is no mecanism to handle several sessions on the same XSubAgent (pooling). If you run several simultaneous sessions dispatching their tests to a common XSubAgent, it may crash.
- If one of the XSubAgent is not properly running at runtime, An Exception will be thrown and the session is frozen