org.robotframework

## Class RobotRunner

- java.lang.Object
- - org.robotframework.RobotRunner

- All Implemented Interfaces:
    java.lang.AutoCloseable

      public class RobotRunner
      extends java.lang.Object
      implements java.lang.AutoCloseable

  AutoCloseable Interface class that internally creates a Jython interpreter, allows running Robot tests with it, and cleans up the interpreter afterwards in close.

  Example:

       try (RobotRunner runner = new RobotRunner()) {
           runner.run(new String[] {"tests.robot"});
       }

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RobotRunner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Cleans up the Jython interpreter.
    `int` | `run(java.lang.String[] args)` Runs the tests, but does not cleanup the interpreter afterwards.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RobotRunner

          public RobotRunner()

  - ### Method Detail

    - #### run

          public int run(java.lang.String[] args)

      Runs the tests, but does not cleanup the interpreter afterwards.
      Parameters:
        `args` - The command line options to Robot Framework.
      Returns:
        Robot Framework return code. See Robot Framework User Guide for meaning of different return codes.

    - #### close

          public void close()

      Cleans up the Jython interpreter.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`