2.8.2. Sample execution
Prev | 2.8. Using the Embedded Agent for tests with API | Next

### 2.8.2. Sample execution

The following Code shows a simple example how the embedded Agent can be used. The class org.eclipse.jubula.autagent.Embedded is responsible for the AutAgents lifecycle. The agent can be started with Embedded.INSTANCE.agent() or with an integer parameter for the port number. Only one Agent could be started and must be stopped with shutdown() before any other agent could be run. If a Embedded Agent is already started, you can get the AUTAgent instance again with Embedded.INSTANCE.agent() .