Skip to content

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.

  • Python 3.10 or newer
  • Robot Framework 4.0 or newer
  • A Testomat.io project API key

Install the plugin with pip:

Terminal window
pip install robot-framework-reporter

If your system has both Python 2 and Python 3, use pip3:

Terminal window
pip3 install robot-framework-reporter
  1. Sign in to Testomat.io.
  2. Create a project or open an existing one.
  3. Select Import from Source Code.
  4. Copy the project API key. It starts with tstmt_.

Use the Testomatio.Import listener to import Robot Framework tests into Testomat.io:

Terminal window
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import path/to/tests

After import, Testomat.io assigns a Test ID to each test.

To import tests with their existing Test IDs into another project, enable the create option:

Terminal window
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:create=1 path/to/tests

To preserve the suite and folder structure from the source code, enable the structure option:

Terminal window
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Import:structure=1 path/to/tests

Use the Testomatio.Report listener to run tests and send their results to Testomat.io:

Terminal window
TESTOMATIO=tstmt_xxxxxxxx robot --listener Testomatio.Report path/to/tests

The listener creates a test run in Testomat.io and uploads results after each test suite completes.

Both listeners support these environment variables:

VariableDescriptionDefault
TESTOMATIOTestomat.io project API keyRequired
TESTOMATIO_URLTestomat.io server URLhttps://app.testomat.io
TESTOMATIO_REQUEST_INTERVALInterval between requests in seconds5
TESTOMATIO_MAX_REQUEST_FAILURESMaximum number of attempts to send a request5

The report listener also supports:

VariableDescriptionDefault
TESTOMATIO_RUNID of an existing test runA new run is created
TESTOMATIO_TITLETest run titleNone
TESTOMATIO_RUNGROUP_TITLERun group titleNone
TESTOMATIO_PUBLISHPublish the run and generate a public URLFalse
TESTOMATIO_DISABLE_BATCH_UPLOADUpload each result separatelyFalse
TESTOMATIO_BATCH_SIZENumber of results uploaded in a batch, up to 10050

For all available import and reporting options, see the robot-framework-reporter documentation.