Testing with a Remote Open Agent

To replay tests against an application on a remote machine with Silk4NET, perform the following actions:
  1. Create a test against the application on the local machine.
  2. Install the Open Agent on the remote machine. For additional information, refer to the Silk Test Installation Guide.
  3. Start the Open Agent on the remote machine.
  4. In the test script, use the Connect method of the Agent class to connect to the remote Open Agent. For example, add the following line to the script:
    // VB .NET code
    Private agent As RemoteAgent = Agent.Connect("hostname:port")
    // C# code
    private RemoteAgent agent = Agent.Connect("hostname:port");
    For additional information, see Testing Applications in Multiple UI Sessions on a Single Machine .
  5. To execute a command in the test script on the remote machine, add the agent to the command. For example, if the command in the local test script was SomeAgentFunction, change the command to the following:
    // VB .NET code
    Dim d As Desktop = agent.Desktop
    Dim baseState = New BaseState()
    agent.ExecuteBaseState(basestate)
    d.SomeAgentFunction()
    // C# code
    Desktop d = agent.Desktop;
    BaseState basestate = new BaseState();
    agent.ExecuteBaseState(basestate);
    d.SomeAgentFunction();