Qase Robot Framework Plugin
Project description
Qase Robot Framework Listener
Publish results simple and easy.
How to integrate
pip install qase-robotframework
Usage
If you want to create a persistent link to Test Cases in Qase, you should add Qase test 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:
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_MODE
- Define mode:testops
to enable reportQASE_ENVIRONMENT
- Environment ID for the runQASE_DEBUG
- If passed something - will enable debug logging for listener. Default:False
QASE_TESTOPS_MODE
- You can switch betweensync
andasync
modes. Default isasync
QASE_TESTOPS_API_TOKEN
- API token to access Qase TestOpsQASE_TESTOPS_PROJECT
- Project code from Qase TestOpsQASE_TESTOPS_PLAN_ID
- Plan ID if you want to add results to existing run from Test PlanQASE_TESTOPS_RUN_ID
- Run ID if you want to add results to existing runQASE_TESTOPS_RUN_TITLE
- Set custom run name when no run ID is providedQASE_TESTOPS_COMPLETE_RUN
- Will complete run after all tests are finished. Default:False
QASE_TESTOPS_HOST
- Define a host for Qase TestOps. Default:qase.io
Usage:
QASE_API_TOKEN=<API TOKEN> QASE_PROJECT=PRJCODE robot --listener qaseio.robotframework.Listener keyword_driven.robot data_driven.robot
Moving variables to tox.ini
, example configuration:
[qase]
qase_testops_api_token=api_key
qase_testops_project=project_code
qase_testops_run_id=run_id
qase_testops_run_title=New Robot Framework Run
qase_debug=True
qase_testops_complete_run=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
Release history Release notifications | RSS feed
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-2.0.1.tar.gz
(14.2 kB
view hashes)
Built Distribution
Close
Hashes for qase-robotframework-2.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af49ec5b4e5c73fdff5bd2c03269be0f82a66e37ae3b3ede392af2ded5d3cc8 |
|
MD5 | 35b0b856694903f0e32b09cd4b6a819f |
|
BLAKE2b-256 | f23e3e71407e78cf66bc43546fb3f52a62da237899157f16b6d1390c5f4e3a1e |
Close
Hashes for qase_robotframework-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28fd1bcc203947fb9a8aa03017bdd7170a50cd1b0ee353d7f7c609008930cadf |
|
MD5 | 5d4209800229eeb5b4b7cb21e193c735 |
|
BLAKE2b-256 | 7e97d042343b90ffbed7ebaaf07ee4f981e61b4899dd00560256917c7ab0e448 |