Skip to main content

Qase Robot Framework Plugin

Project description

Qase TestOps Robot Framework Reporter

License

Installation

pip install qase-robotframework==3.0.0b1

Upgrade from 2.x to 3.x

The new version 3.x of the Robot Framework reporter has breaking changes. To migrate from versions 2.x, follow the upgrade guide.

Configuration

Qase Robot Framework Reporter is configured in multiple ways:

  • using a config file qase.config.json
  • using environment variables

Environment variables override the values given in the config file.

Configuration options are described in the configuration reference.

Example: qase.config.json

{
  "mode": "testops", 
  "fallback": "report",
  "debug": true,
  "testops": {
    "project": "YOUR_PROJECT_CODE",
    "api": {
      "token": "YOUR_API_TOKEN",
      "host": "qase.io"
    },
    "run": {
      "title": "Test run title"
    },
    "batch": {
      "size": 100
    }
  },
    "report": {
    "driver": "local",
    "connection": {
      "local": {
        "path": "./build/qase-report",
        "format": "json" 
      }
    }
  },
  "environment": "local"
}

Usage

Link tests with test cases in Qase TestOps

To link the automated tests with the test cases in Qase TestOps, use the tags in form like Q-<case id without project code>. 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:

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"

Execution:

robot --listener qase.robotframework.Listener someTest.robot

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-3.0.0b1.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

qase_robotframework-3.0.0b1-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

Supported by

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