diff --git a/qase-robotframework/docs/CONFIGURATION.md b/qase-robotframework/docs/CONFIGURATION.md index 2ae3bfc0..76578a2b 100644 --- a/qase-robotframework/docs/CONFIGURATION.md +++ b/qase-robotframework/docs/CONFIGURATION.md @@ -9,25 +9,26 @@ Environment variables override the values given in the config file. ## Configuration options -| Description | Config file | Environment variable | Default value | Required | Possible values | -|------------------------------------------------|----------------------------|---------------------------------|-----------------------------------------|----------|----------------------------| -| **Common** | -| Main reporting mode | `mode` | `QASE_MODE` | `testops` | No | `testops`, `report`, `off` | -| Fallback reporting mode | `fallback` | `QASE_FALLBACK` | `report` | No | `testops`, `report`, `off` | -| Execution plan path | `execution_plan_path` | `QASE_EXECUTION_PLAN_PATH` | `./build/qase-execution-plan.json` | No | Any string | -| **Qase TestOps mode configuration** | -| Qase project code | `testops.project` | `QASE_TESTOPS_PROJECT` | | Yes | Any string | -| Qase API token | `testops.api.token` | `QASE_TESTOPS_API_TOKEN` | | Yes | Any string | -| Qase API host | `testops.api.host` | `QASE_TESTOPS_API_HOST` | `qase.io` | No | Any string | -| Title of the Qase test run | `testops.run.title` | `QASE_TESTOPS_RUN_TITLE` | `Automated Run {current date and time}` | No | Any string | -| Description of the Qase test run | `testops.run.description` | `QASE_TESTOPS_RUN_DESCRIPTION` | None, leave empty | No | Any string | -| Create test run using a test plan | `testops.plan.id` | `QASE_TESTOPS_PLAN_ID` | None, don't use plans for the test run | No | Any integer | -| Complete test run after running tests | `testops.run.complete` | `QASE_TESTOPS_RUN_COMPLETE` | `True` | No | `true`, `false` | -| ID of the Qase test run to report results | `testops.run.id` | `QASE_TESTOPS_RUN_ID` | None, create a new test run | No | Any integer | -| Batch size for uploading test results | `testops.batch.size` | `QASE_TESTOPS_BATCH_SIZE` | 200 | No | 1 to 2000 | -| Create defects in Qase | `testops.defect` | `QASE_TESTOPS_DEFECT` | `False`, don't create defects | No | `True`, `False` | -| Qase environment | `environment` | `QASE_ENVIRONMENT` | `local` | No | Any string | -| **Qase Report mode configuration** | -| Local path to store report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `./build/qase-report` | No | Any string | -| Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `json` | No | `json`, `jsonp` | -| Driver used for report mode | `report.driver` | `QASE_REPORT_DRIVER` | `local` | No | `local` | +| Description | Config file | Environment variable | Default value | Required | Possible values | +|-------------------------------------------|----------------------------|---------------------------------|-----------------------------------------|----------|----------------------------| +| **Common** | +| Main reporting mode | `mode` | `QASE_MODE` | `testops` | No | `testops`, `report`, `off` | +| Fallback reporting mode | `fallback` | `QASE_FALLBACK` | `report` | No | `testops`, `report`, `off` | +| Execution plan path | `execution_plan_path` | `QASE_EXECUTION_PLAN_PATH` | `./build/qase-execution-plan.json` | No | Any string | +| Qase environment | `environment` | `QASE_ENVIRONMENT` | `local` | No | Any string | +| Root suite | `rootSuite` | `QASE_ROOT_SUITE` | | No | Any string | +| **Qase TestOps mode configuration** | +| Qase project code | `testops.project` | `QASE_TESTOPS_PROJECT` | | Yes | Any string | +| Qase API token | `testops.api.token` | `QASE_TESTOPS_API_TOKEN` | | Yes | Any string | +| Qase API host | `testops.api.host` | `QASE_TESTOPS_API_HOST` | `qase.io` | No | Any string | +| Title of the Qase test run | `testops.run.title` | `QASE_TESTOPS_RUN_TITLE` | `Automated Run {current date and time}` | No | Any string | +| Description of the Qase test run | `testops.run.description` | `QASE_TESTOPS_RUN_DESCRIPTION` | None, leave empty | No | Any string | +| Create test run using a test plan | `testops.plan.id` | `QASE_TESTOPS_PLAN_ID` | None, don't use plans for the test run | No | Any integer | +| Complete test run after running tests | `testops.run.complete` | `QASE_TESTOPS_RUN_COMPLETE` | `True` | No | `true`, `false` | +| ID of the Qase test run to report results | `testops.run.id` | `QASE_TESTOPS_RUN_ID` | None, create a new test run | No | Any integer | +| Batch size for uploading test results | `testops.batch.size` | `QASE_TESTOPS_BATCH_SIZE` | 200 | No | 1 to 2000 | +| Create defects in Qase | `testops.defect` | `QASE_TESTOPS_DEFECT` | `False`, don't create defects | No | `True`, `False` | +| **Qase Report mode configuration** | +| Local path to store report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `./build/qase-report` | No | Any string | +| Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `json` | No | `json`, `jsonp` | +| Driver used for report mode | `report.driver` | `QASE_REPORT_DRIVER` | `local` | No | `local` | diff --git a/qase-robotframework/src/qase/robotframework/listener.py b/qase-robotframework/src/qase/robotframework/listener.py index 0a4128e1..0a58179f 100644 --- a/qase-robotframework/src/qase/robotframework/listener.py +++ b/qase-robotframework/src/qase/robotframework/listener.py @@ -18,14 +18,13 @@ class Listener: ROBOT_LISTENER_API_VERSION = 2 def __init__(self): - self.config = ConfigManager() - self.reporter = QaseCoreReporter(self.config) + config = ConfigManager().config + self.reporter = QaseCoreReporter(config) self.runtime = Runtime() self.step_uuid = None self.suite = {} - self.debug = self.config.get("debug", False, bool) - if self.debug: + if config.debug: logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() formatter = logging.Formatter(