Shutdown Method (Agent)

Class

Agent.

Action

Call this method to ensure that the Open Agent stops after a test run, for example after a nightly test execution. You should only call this method at the end of a test execution, and not before all actions of the test are executed. If any actions would follow the Shutdown, the agent would be restarted. Alternatively, the following code sample shows how you can stop the Open Agent from the command line:
openAgent.exe -shutDown

Syntax

C#
Shutdown()
VB
Shutdown()

Example: Using the shutdown method

// VB code
<AssemblyCleanup()>
Public Shared Sub ShutdownAgentAfterTestRun()
  Agent.Shutdown()
End Sub
// C# code
[AssemblyCleanup]
public static void AssemblyCleanup() {
  Agent.Shutdown();
}