Skip to main content

Robot Framework plugin for sync and report test to testomat.io

Project description

Support Ukraine Badge

Testomat.io plugin for Robot Framework

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

Features

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

Uses testomat.io API:

Table of Contents

Installation

Prerequisites:

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

Install via pip:

pip install robot-framework-reporter

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

pip3 install robot-framework-reporter

Quick Start

Get your API token

  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_")

Sync tests

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

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

Report tests

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

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

Example of test

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

Advanced Usage

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

Basic Configuration

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.

Common Environment Variables

Both Listeners use the following environment variables:

Variable Description Required Default
TESTOMATIO API key for accessing Testomat.io ✅ Yes -
TESTOMATIO_URL Testomat.io server URL ➖ No https://app.testomat.io
TESTOMATIO_REQUEST_INTERVAL Interval between requests to Testomat.io in seconds ➖ No 5
TESTOMATIO_MAX_REQUEST_FAILURES Max attempts to send request to Testomat.io ➖ No 5

Testomatio.Import Listener

Used for importing tests to Testomat.io.

Import Listener Configuration

Environment variables
Variable Description Required Default
TESTOMATIO_IMPORT_DIRECTORY Specifies directory where tests will be imported ➖ No None
TESTOMATIO_SYNC_LABELS Assign 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
➖ No None
Listener Parameters
Parameter Description Required Type Default
remove_ids Remove all test ids from source code ➖ No bool False
no_detach Disables detaching tests on Testomat.io ➖ No bool False
no_empty Removes empty suites on Testomat.io ➖ No bool False
create Use to import Test ids set in source code into another project ➖ No bool False
structure Force to keep original file structure ➖ No bool False

Clean Test IDs

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:

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.

Detaching tests

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:

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

Removing empty suites

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.

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

This prevents usage structure parameter.

Keep Test IDs between projects

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.

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

Keep structure

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:

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

Testomatio.Report Listener

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

Report Listener Configuration

Environment variables
Variable Description Required Default
TESTOMATIO_DISABLE_BATCH_UPLOAD Disables batch uploading and uploads each test result one by one ➖ No False
TESTOMATIO_BATCH_SIZE Changes size of batch for batch uploading. Maximum is 100. ➖ No 50
TESTOMATIO_RUN Id of existing test run to use for sending test results to ➖ No None
TESTOMATIO_PUBLISH Publish run after reporting and provide a public URL ➖ No False
TESTOMATIO_TITLE Name of a test run to create on Testomat.io ➖ No None
TESTOMATIO_RUNGROUP_TITLE Create a group (folder) for a test run. If group already exists, attach test run to it ➖ No None
Listener Parameters

Currently, has no parameters

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robot_framework_reporter-0.2.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robot_framework_reporter-0.2.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file robot_framework_reporter-0.2.0.tar.gz.

File metadata

  • Download URL: robot_framework_reporter-0.2.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robot_framework_reporter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 17cc24229517104a28b5b58ed88a48cb210271449e71dbcbae4dd2a871fbbfbd
MD5 1da32c3247fabdff5034cc6412ecdc16
BLAKE2b-256 9c9fd69634f71715077bad482929895f6469069138c2205f72396b6a21a26a76

See more details on using hashes here.

Provenance

The following attestation bundles were made for robot_framework_reporter-0.2.0.tar.gz:

Publisher: main.yml on testomatio/robot-framework-reporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robot_framework_reporter-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robot_framework_reporter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e75b8b679f7452cc274a3f749e7a8cce4223d477b44cebce2175f34739809c7f
MD5 449d3bafd86ddefd07739440e5bf142f
BLAKE2b-256 d17a8aed812396854d17c8caf59a6b9942447bfafcc94125cc1290616174429f

See more details on using hashes here.

Provenance

The following attestation bundles were made for robot_framework_reporter-0.2.0-py3-none-any.whl:

Publisher: main.yml on testomatio/robot-framework-reporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page