Skip to main content

Qase TMS Robot Framework Listener

Project description

Qase TMS Robot Framework Listener

Publish results simple and easy.

How to integrate

pip install qase-robotframework

Usage

You must add Qase case IDs to robot framework tests. They should be added as a tags in form like Q-<case id without project code>. You can use upper and lower case to indicate the test case IDs. Example:

*** Test Cases ***
Push button
    [Tags]  q-2
    Push button    1
    Result should be    1

Push multiple buttons
    [Tags]  Q-3
    Push button    1
    Push button    2
    Result should be    12
*** Test Cases ***    Expression    Expected
Addition              12 + 2 + 2    16
                      2 + -3        -1
    [Tags]   Q-7

Subtraction           12 - 2 - 2    8
                      2 - -3        5
    [Tags]   Q-8

Working with steps

Listener supports reporting steps results: But in order to use it, you should follow some rules:

  • Steps name in Qase TMS should match to the steps in Robot Framework
  • If step in RF has some parameters (e.g. Push Button 12) parameter would be ignored and the comparison to step in TMS will be made like: step in TMS should start with step name in RF. So if your step in RF is Open page it will be matched to step Open page https://qase.io in TMS.
  • You should preserve the order of steps. You can skip steps in RF, but you shouldn't mix them or so on - Qase does not support creating steps on the fly yet.

Example:

Quick Get A JSON Body Test                                                  ## Test case: "Quick Get A JSON Body Test"
    [Tags]  Q-3
    ${response}=    GET  https://jsonplaceholder.typicode.com/posts/1       ## 1-st step - "GET"
    Should Be Equal As Strings    1  ${response.json()}[id]                 ## 2-nd step - "Should Be Equal As Strings"

Initializing the test case                                                  ## Test case: "Initializing the test case"
    [Tags]  q-4
    Set To Dictionary    ${info}   field1=A sample string                   ## 1-st step - "Set To Dictionary"

Configuration

Listener supports loading configuration both from environment variables and from tox.ini file.

ENV variables:

  • QASE_API_TOKEN - API token to access Qase TMS
  • QASE_PROJECT - Project code from Qase TMS
  • QASE_RUN_ID - Run ID if you want to add results to existing run
  • QASE_RUN_NAME - Set custom run name when no run ID is provided
  • QASE_DEBUG - If passed something - will enable debug logging for listener

Usage:

QASE_API_TOKEN=<API TOKEN> QASE_PROJECT=PRJCODE robot --listener qaseio.robotframework.Listener keyword_driven.robot data_driven.robot

reporter Moving variables to tox.ini, example configuration:

[qase]
qase_api_token=api_key
qase_project=project_code
qase_run_id=run_id
qase_run_name=New Robot Framework Run
qase_debug=True

Execution:

robot --listener qaseio.robotframework.Listener someTest.robot

Contribution

Install project locally:

python3 -m venv .venv
source .venv/bin/activate
pip install -e .[testing]

Install dev requirements:

pip install pre-commit
pre-commit install

Test project:

tox

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

qase-robotframework-1.1.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

qase_robotframework-1.1.1-py2.py3-none-any.whl (10.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qase-robotframework-1.1.1.tar.gz.

File metadata

  • Download URL: qase-robotframework-1.1.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for qase-robotframework-1.1.1.tar.gz
Algorithm Hash digest
SHA256 12ae005401f7328ad107ec5f719325301f6a18de7b9e86e4f5b91b40ce282f8f
MD5 83a72e151e94169b43eefefaf0200a33
BLAKE2b-256 289ba160335944fb8e647f152df8a8d55e22fac88f5a0cc8e071886a25625d1e

See more details on using hashes here.

File details

Details for the file qase_robotframework-1.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for qase_robotframework-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 95d6a088055d44ed94ca266aa1f20e80aa10667f5f697f66aaf392dd1d296070
MD5 ba1b324601b26ab87d91c4f77b6518e9
BLAKE2b-256 80a586670380ce203faf3cbbf69ff1166a036cc4dceae18d53f3feaab0f63c9d

See more details on using hashes here.

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