Taurus Configuration LinterDue to the non-strict nature of YAML, syntactic and semantic errors in the configuration files are not a rare thing. Linting subsystem is an attempt to automatically warn user about errors, misprints and straight-out errors in the configuration files. Linting is done right after all configuration files are loaded and just before any modules are prepared. Linting outputHere's the example of linter output: WARNING: at path 'execution.0.ramp': unfamiliar name 'ramp'. Did you mean 'ramp-up'? WARNING: at path 'execution.0.throuhhput': unfamiliar name 'throuhhput'. Did you mean 'throughput'? WARNING: at path 'execution.0.scenario': scenario 'foobar' is used but isn't defined For each issue found, linter prints one warning. Each warning contains a path to the problematic code (e.g. execution.0.scenario) and a warning message. The paths are the same as used in CLI overrides and can be read pretty easily. For example, path execution.0.ramp means the key ramp that is defined inside the first element of the execution list. Running the linterLinter is always enabled by default and is invoked right after configuration is loaded. By default, linter prints a warning for each issue found, but it doesn't prevent test execution. If you need to lint the config without actually running the test, you can use the -lint command-lint flag. Example: $ bzt -lint my-config.yml Using -lint results in the following exit codes. The exit code is equal 0 if there were no issues found in the configuration and 1 if issues were found. If for some reason you want to disable the linting, you can pass a -nolint flag, which will disable linting completely. Configuring LinterJust like everything in Taurus, linting can be configured within a configuration file. cli: linter: disable: false # set to true to disable linting lint-and-exit: true # stop Taurus after linting, thus preventing test execution ignored-warnings: # list of warning ids to ignore. empty by default - single-execution - possible-typo Warnings Produced by LinterTaurus implements the following checks:
|
On this page:
Quick Links: |