Skip to content

Robot Framework

A powerful plugin that integrates your tests with Testomat.io platform for test management, reporting and analytics

  • ✅ Sync tests with testomat.io
  • 📊 Real-time test execution reporting

Prerequisites:

  • Python 3.10+
  • Robot Framework 4.0+
  • Active testomat.io account

Install via pip:

Terminal window
pip install robot-framework-reporter

If you have Python 2.x and Python 3.x in your system:

Terminal window
pip3 install robot-framework-reporter
  1. Login to Testomat.io
  2. Create project or go to existing project
  3. Click on “Import Tests from Source Code”
  4. Copy your project token(starts with “tstmt_”)

Synchronize tests to Testomat.io using Testomatio.Import listener:

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

Execute tests and send results to Testomat.io using Testomatio.Report listener:

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

After importing tests to Testomat.io, each test is automatically assigned a unique Test ID.
Testomat.io Test ID is a string value that starts with @T and contains 8 characters after. Test ID is appended to the test name

Before import (original test):

*** Test Cases ***
Test Addition
[Documentation] Check addition of two numbers
[Tags] math positive
${result}= Evaluate 10 + 5
Should Be Equal As Numbers ${result} 15

After import (with Test ID):

*** Test Cases ***
Test Addition @T96c700e6
[Documentation] Check addition of two numbers
[Tags] math positive
${result}= Evaluate 10 + 5
Should Be Equal As Numbers ${result} 15

Testomat.io integration with Robot Framework is implemented through the Listener Interface. Currently, two Listeners are available:

  • Testomatio.Import. Used for synchronizing tests with Testomat.io
  • Testomatio.Report. Used for reporting test results to Testomat.io

Listeners can be configured through parameters or environment variables. Each Listener has its own configuration options, which are described in the corresponding sections.

💡 Note: Parameters and environment variables configure different aspects of the Listener’s behavior. Each configuration option is available through only one method - either as a parameter or as an environment variable, not both.

Both Listeners use the following environment variables:

VariableDescriptionRequiredDefault
TESTOMATIOAPI key for accessing Testomat.io✅ Yes-
TESTOMATIO_URLTestomat.io server URL➖ Nohttps://app.testomat.io
TESTOMATIO_REQUEST_INTERVALInterval between requests to Testomat.io in seconds➖ No5
TESTOMATIO_MAX_REQUEST_FAILURESMax attempts to send request to Testomat.io➖ No5

Used for importing tests to Testomat.io.

VariableDescriptionRequiredDefault
TESTOMATIO_IMPORT_DIRECTORYSpecifies directory where tests will be imported➖ NoNone
TESTOMATIO_SYNC_LABELSAssign labels to a test case when you import test to Testomat.io.
Labels must exist in project and their scope must be enabled for tests. To pass multiple labels, separate them by a comma
➖ NoNone
ParameterDescriptionRequiredTypeDefault
remove_idsRemove all test ids from source code➖ NoboolFalse
no_detachDisables detaching tests on Testomat.io➖ NoboolFalse
no_emptyRemoves empty suites on Testomat.io➖ NoboolFalse
createUse to import Test ids set in source code into another project➖ NoboolFalse
structureForce to keep original file structure➖ NoboolFalse

If you want to import the synced project as new project, you have to clean the test ids. To clean up test ids use remove_ids parameter:

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

This method may be unsafe, as it cleans all @T* tags from tests names. So if you have a tag like @Test1234 in test name this may also be removed. If you use this option make sure if all the test titles a proper before committing the tests in GIT.

If a test from a previous import was not found on next import it is marked as “detached”. This is done to ensure that deleted tests are not staying in Testomatio while deleted in codebase.

To disable this behavior and don’t mark anything on detached on import use no_detach parameter:

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

If tests were marked with IDs and imported to already created suites in Testomat.io newly imported suites may become empty. Use no_empty parameter to clean them up after import.

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

This prevents usage structure parameter.

To import tests with Test IDs set in source code into another project use create parameter. In this case, a new project will be populated with the same Test IDs.

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

When tests in source code have IDs assigned and those tests are imported, Testomat.io uses current structure in a project to put the tests in. If folders in source code doesn’t match folders in Testomat.io project, existing structure in source code will be ignored. To force using the structure from the source code, use structure parameter on import:

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

Used for reporting test results to Testomat.io. By default, sends test results in batches after each test suite completes.

VariableDescriptionRequiredDefault
TESTOMATIO_DISABLE_BATCH_UPLOADDisables batch uploading and uploads each test result one by one➖ NoFalse
TESTOMATIO_BATCH_SIZEChanges size of batch for batch uploading. Maximum is 100.➖ No50
TESTOMATIO_RUNId of existing test run to use for sending test results to➖ NoNone
TESTOMATIO_PUBLISHPublish run after reporting and provide a public URL➖ NoFalse
TESTOMATIO_TITLEName of a test run to create on Testomat.io➖ NoNone
TESTOMATIO_RUNGROUP_TITLECreate a group (folder) for a test run. If group already exists, attach test run to it➖ NoNone

Currently, has no parameters