Robot Framework
title: Robot Framework description: Import Robot Framework tests into Testomat.io and report test results with the Testomatio listeners. type: article url: https://docs.testomat.io/test-reporting/robot-framework head:
- tag: meta attrs: name: keywords content: Testomat.io, Robot Framework, test reporting, test import, Python, automation testing
The robot-framework-reporter plugin integrates Robot Framework with Testomat.io. It can import tests and report test execution results in real time.
Requirements
Section titled “Requirements”- Python 3.10 or newer
- Robot Framework 4.0 or newer
- A Testomat.io project API key
Installation
Section titled “Installation”Install the plugin with pip:
pip install robot-framework-reporterIf your system has both Python 2 and Python 3, use pip3:
pip3 install robot-framework-reporterGet a project API key
Section titled “Get a project API key”- Sign in to Testomat.io.
- Create a project or open an existing one.
- Select Import from Source Code.
- Copy the project API key. It starts with
tstmt_.
Import tests
Section titled “Import tests”Use the Testomatio.Import listener to import Robot Framework tests into Testomat.io:
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import path/to/testsAfter import, Testomat.io assigns a Test ID to each test.
Preserve existing Test IDs
Section titled “Preserve existing Test IDs”To import tests with their existing Test IDs into another project, enable the create option:
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:create=1 path/to/testsKeep the source structure
Section titled “Keep the source structure”To preserve the suite and folder structure from the source code, enable the structure option:
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:structure=1 path/to/testsReport test results
Section titled “Report test results”Use the Testomatio.Report listener to run tests and send their results to Testomat.io:
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Report path/to/testsThe listener creates a test run in Testomat.io and uploads results after each test suite completes.
Configuration
Section titled “Configuration”Both listeners support these environment variables:
| Variable | Description | Default |
|---|---|---|
TESTOMATIO | Testomat.io project API key | Required |
TESTOMATIO_URL | Testomat.io server URL | https://app.testomat.io |
TESTOMATIO_REQUEST_INTERVAL | Interval between requests in seconds | 5 |
TESTOMATIO_MAX_REQUEST_FAILURES | Maximum number of attempts to send a request | 5 |
The report listener also supports:
| Variable | Description | Default |
|---|---|---|
TESTOMATIO_RUN | ID of an existing test run | A new run is created |
TESTOMATIO_TITLE | Test run title | None |
TESTOMATIO_RUNGROUP_TITLE | Run group title | None |
TESTOMATIO_PUBLISH | Publish the run and generate a public URL | False |
TESTOMATIO_DISABLE_BATCH_UPLOAD | Upload each result separately | False |
TESTOMATIO_BATCH_SIZE | Number of results uploaded in a batch, up to 100 | 50 |
For all available import and reporting options, see the robot-framework-reporter documentation.