# RPA Runner

This package provides a mechanism to execute Robot Framework tasks defined in JSON format with support for `PARALLEL` blocks, and a `Run Parallel` keyword for parallel execution.

## Installation

```bash
pip install .
```

## Usage

### Command Line Runner

The package provides a command-line tool `rpa-runner` (or `python -m rpa_runner.runner`) to execute JSON test definitions.

```bash
rpa-runner test_parallel.json --outputdir results
```

### JSON Format & Parallel Execution

The runner automatically transforms `PARALLEL` blocks in your JSON test definition into calls to the `Run Parallel` keyword, which uses `pabot` under the hood.

```json
{
  "name": "My Suite",
  "tests": [
    {
      "name": "Test 1",
      "body": [
        {
          "type": "PARALLEL",
          "branches": [
            {
              "name": "Concurrent A",
              "body": [{ "name": "Log", "args": ["Running A"] }]
            }
          ]
        }
      ]
    }
  ]
}
```

### Library Usage

You can also use the library directly in Robot Framework:

```robot
*** Settings ***
Library    rpa_runner
```
