Auto Completions for BDD steps while editing a feature file
Redirecting from the feature bdd step to the step definition function (right click, Bdd->Step Definition) by clicking ctr+shift+down
Run any bdd scenario directly from the feature file (right click, Bdd-> Run Scenario) by clicking ctr+shift+r (also available with no bdd tests)
Debug any scenario directly from the feature file (right click, Bdd-> Debug Scenario) by clicking ctr+shift+t (also available with no bdd tests)
Integrated Test explorer:
Test explorer: Run/Debug tests by selecting folders, python test files, feature files or single scenarios
Test explorer: Redirect from the test explorer item to the file
Test explorer: Check last output by clicking an item (not available for debugging)
Test explorer: Option to show only BDD scenarios
Find bdd step decorator references (right click, Bdd-> Find References). Results are shown in 'BDD References' view container
Delete Pytest Cache in workspace (Ctr+Shift+p, Bdd-> Delete Pytest Cache Files). This commands works only if the default terminal is "Windows PowerShell"
Create Step Definition (right click, Bdd-> Create Step).
Use the following setting to set your parser (default value is "Parser")
"PytestBdd.parser": "cfparse"
Requirements
Python (ms-python.python) addon installed
Disable any "gherkin", "cucumber" related addons
BDD tests should follow this structure:
rootdir\
example1\
features\
my_feature_1.feature
my_feature_2.feature
step_defs\
my_steps_1_steps.py (must end with '_steps.py')
my_steps_2_steps.py
test_run_my_features.py (must start with 'test_' and to include the features, scenarios("./features/"))
__init__.py
Restart vscode after installing this extension
Extension Settings
Add the following setting to your json settings file:
"editor.semanticTokenColorCustomizations": {
"enabled": true, // enable for all themes
},