- Behave Tutorial
- Behave - Home
- Behave - Introduction
- Behave - Installation
- Behave - Command Line
- Behave - Configuration Files
- Behave - Feature Testing Setup
- Behave - Gherkin Keywords
- Behave - Feature Files
- Behave - Step Implementations
- Behave - First Steps
- Behave - Supported Languages
- Behave - Step Parameters
- Behave - Scenario Outlines
- Behave - Multiline Text
- Behave - Setup Table
- Behave - Steps in a Step
- Behave - Background
- Behave - Data Types
- Behave - Tags
- Behave - Enumeration
- Behave - Step Matchers
- Behave - Regular Expressions
- Behave - Optional Part
- Behave - Multi-Methods
- Behave - Step Functions
- Behave - Step Parameters
- Behave - Runner Script
- Behave - Exclude Tests
- Behave - Retry Mechanism
- Behave - Reports
- Behave - Hooks
- Behave - Debugging
- Behave Useful Resources
- Behave - Quick Guide
- Behave - Useful Resources
- Behave - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Behave - Command Line
Behave has a collection of command line arguments and it can also be outlined from the configuration files. The values set in the configuration files are used automatically, however, it can be overruled by the command line arguments.
Command Line Arguments
Let us discuss some of the command line arguments −
Impair the usage of the ANSI color escapes.
Utilise the ANSI color escapes. This is an in-built characteristic and can overrule a setting in the configuration file.
Summons the formatter without running the steps.
Declares the customised information for the config.userdata dictionary.
–e, --exclude Pattern
Exclude feature files which are identical to a pattern of regular expression from the execution.
–i, --include Pattern
Include feature files which are identical to a pattern of regular expression during the execution.
Omit JUnit reports as output.
Add JUnit reports as output. When JUnit is turned on, every stdout and stderr will be a part of the junit report. (Irrespective of the -capture/-no-capture options).
Define a formatter. If omitted, the in-built formatter is utilised. The –format-help command shall display all the available formats.
Displays a catalogue of all the existing step definitions.
Exclude skipped steps from printing in console.
Exclude snippets from printing in console for the steps, which are still not implemented.
Include snippets, while printing in console for the steps which are still not implemented. This is an in-built characteristic and can overrule a configuration file setting.
Exclude multiple lines tables and strings under steps.
Include multiple lines tables and strings under steps. This is an in-built characteristic and can overrule a configuration file setting.
Include the feature elements, which are identical to the specified name in the run. If the option is provided multiple times, it shall match with all the names.
Exclude stdout from capturing.
Include stdout. This is an in-built characteristic and can overrule a configuration file setting.
Exclude stderr from capturing.
Include stderr. This is an in-built characteristic and can overrule a configuration file setting.
Exclude log from capturing.
Include log capturing. Every log for a step will be present and available during the failures. This is an in-built characteristic and can overrule a configuration file setting.
Mention the logging level that shall be captured. The default value is INFO.
Mention the user-defined format for printing statements. The default value is %(levelname)s:%(name)s:%(message)s.
Mention the user-defined date and time format for printing statements.
Mention if the statements are to be filtered or not. All the statements are captured by default. In case the output is too lengthy, we can utilise the option to filter out the unnecessary output.
Remove all the handlers which are used for logging.
Exclude summary post the execution.
Include summary post the execution.
Write the given file instead of using stdout.
Alias are used for –no-snippets –no-source.
Exclude printing the file and the line of step definition along with steps.
Include printing the file and the line of step definition along with the steps. This is an in-built characteristic and can overrule a configuration file setting.
Terminate executing tests after encountering the first failure.
Include the features/scenarios having tags, which are identical to TAG_EXPRESSION in the execution.
Exclude printing duration of execution for each step.
Capture the duration taken by each step to complete in seconds in the console. This is an in-built characteristic and can overrule a configuration file setting.
Displays the loaded features and files.
Execute the scenarios having the wip tag. Moreover, we have to use the plain formatter and not record the stdout or log output and terminate post first failure.
Flatten the table of Scenario Outline in output.
Utilise keywords for a language except English.
Displays all the languages present in –lang.
Displays all the translations acquired for a single language.
Display help for tag statements.
This is the directory location where the Junit reports are stored.
Include skipped steps while printing in console. This is an in-built characteristic and can overrule a configuration file setting.