Qase TestOps Behave Reporter
To install the latest version, run:
pip install pre qase-behave
The Behave reporter can auto-generate test cases and suites from your test data. Test results of subsequent test runs will match the same test cases as long as their names and file paths don't change.
You can also annotate the tests with the IDs of existing test cases from Qase.io before executing tests. It's a more reliable way to bind autotests to test cases, that persists when you rename, move, or parameterize your tests.
qase.id
- set the ID of the test caseqase.fields
- set the fields of the test caseqase.suite
- set the suite of the test caseqase.ignore
- ignore the test case in Qase. The test will be executed, but the results will not be sent to Qase.
For detailed instructions on using annotations and methods, refer to Usage.
For example:
Feature: Example tests
@qase.id:1 @qase.fields:{"description":"It_is_simple_test"} @qase.suite:MySuite
Scenario: Example test
Given I have a simple test
When I run it
Then it should pass
To execute Behave tests and report them to Qase.io, run the command:
behave --format=qase.behave.formatter:QaseFormatter
You can try it with the example project at examples/behave
.
Qase Behave Reporter is configured in multiple ways:
- using a config file
qase.config.json
- using environment variables
- using command line options
Environment variables override the values given in the config file, and command line options override both other values.
Configuration options are described in the configuration reference.
{
"mode": "testops",
"fallback": "report",
"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"
}
We maintain the reporter on LTS versions of Python.
python >= 3.7
behave >= 1.2.6