Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>GherkinLens: Pytest-BDD & Behave ToolsNew to Visual Studio Code? Get it now.
GherkinLens: Pytest-BDD & Behave Tools

GherkinLens: Pytest-BDD & Behave Tools

Chinmay Singh

|
38 installs
| (0) | Free
Python BDD support for pytest-bdd and behave with navigation, autocomplete, diagnostics, formatting, and an optional pytest-bdd runner.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

GherkinLens

Navigate, validate, format, and optionally run Python BDD feature files in VS Code.

GherkinLens turns VS Code into a first-class editor for Python BDD projects. It indexes your step definition files and brings Go to Definition, Hover, Autocomplete, Diagnostics, Quick Fix, CodeLens, and full document formatting directly into your .feature files — for both pytest-bdd and behave.

For pytest-bdd projects, GherkinLens can also enable an optional native VS Code Testing runner with a BDD-first tree for features, scenarios, scenario outlines, examples, and tag expressions. The core editor experience still parses source without running pytest; the runner stays disabled by default and only invokes pytest when you refresh, run, or debug BDD tests.

At a glance:

  • Editor intelligence for pytest-bdd and behave feature files
  • Optional native Testing runner for pytest-bdd
  • BDD-first tree: folders -> Feature -> Scenario / Scenario Outline -> Examples -> rows
  • Run/debug current feature, scenario, example row, or tag expression
  • Integrated terminal commands for colored pytest output

Features

Go to Definition

Press F12 or Ctrl+Click on any Gherkin step to jump directly to the matching Python decorator in your step definition file.

  • Works for @given, @when, @then, and @step decorators
  • Supports plain string patterns, parsers.parse(...) format strings, and parsers.re(...) regular expressions
  • Holding Ctrl while hovering underlines the full step line, giving you a visual preview before you jump

Go to Definition


Hover

Hover over any Gherkin step to see rich inline documentation pulled live from your Python source:

  • The decorator line (e.g. @given(parsers.parse("the user {username} logs in")))
  • The function signature (scanned forward through multi-line decorators)
  • The relative file path and line number where the definition lives
  • A clickable "Open in editor" link that navigates directly to the definition

When a step matches multiple definitions (e.g. via @step which expands to all three keyword types), each match is shown as a separate section separated by a horizontal rule.

If you prefer a quieter editor, set gherkinLens.hover.enabled to false. Go to Definition, Ctrl+Click navigation, diagnostics, autocomplete, and CodeLens continue to work.

Hover


Autocomplete

Start typing a Gherkin step keyword (Given, When, Then, And, But, or *) followed by a space and GherkinLens offers completions sourced from your indexed step definitions.

  • Completions show the decorator type (@given, @when, @then) and the source file and line number in the detail line
  • Each completion item shows a Python code block with the decorator and function signature in the documentation popup
  • Tab-stop navigation — {param} placeholders in parsers.parse patterns become snippet tab stops; named capture groups in parsers.re patterns become named tab stops. Press Tab to move from one to the next
  • Snippet session tracking — once you accept a completion, the automatic suggestion popup is suppressed on that line while you fill in the tab stops, so Tab always moves to the next field without interference
  • Deduplication — @step decorators (which register for given/when/then simultaneously) appear only once in the completion list
  • Auto-suppression — once the text on the current line already matches a known step definition, completions stop appearing automatically (manual invocation via Ctrl+Space still works)

Autocomplete


Diagnostics

GherkinLens continuously checks every open .feature file against the indexed step definitions and reports problems in real time.

  • Unmatched steps get a yellow (warning) squiggly underline from the first non-whitespace character to the end of the step text
  • All unmatched steps also appear in the Problems panel (Ctrl+Shift+M) with the message No step definition found for: "..."
  • Diagnostics update automatically when:
    • A .feature file is opened or saved
    • A Python step definition file is saved (auto re-index triggers and squiggles refresh immediately)
    • The step cache is rebuilt manually via GherkinLens: Reindex Step Definitions
  • The status bar item shows ⚠ N unmatched when any open file has broken steps

Diagnostics


Quick Fix — Create Step Definition

When a step is unmatched, a lightbulb (💡) appears on that line. Click it (or press Ctrl+.) and select "Create step definition" to scaffold a stub automatically.

What GherkinLens generates for you:

  • A correctly named Python function in snake_case, derived intelligently from your step text (truncated at 60 characters at a word boundary)
  • A @given / @when / @then / @step decorator matching the keyword used in the feature file (And and But map to @step)
  • Smart parameter detection — quoted strings in the step text become {param} placeholders using a context-aware naming strategy:
    1. The word immediately before the opening quote (e.g. username from the user "alice")
    2. The quoted content itself if it is a plain identifier (e.g. button from "button")
    3. A sequential fallback (param1, param2, …)
  • Numeric parameter detection — standalone floats (1.5) become {float} and integers (42) become {int}, with suffixes ({float2}, {int2}) for duplicates
  • When parameters are present, parsers.parse("...") is used as the decorator argument so pytest-bdd captures the values at runtime
  • A raise NotImplementedError("step not implemented") body so tests fail loudly rather than silently passing

Import handling:

  • Existing file — GherkinLens checks whether parsers is already imported. If not, it prepends from pytest_bdd import parsers at the top of the file automatically
  • New file — A complete import header is generated: from pytest_bdd import given, when, then, step, parsers

File picker:

A quick-pick dropdown lists all currently indexed Python files by their relative workspace path. A separator at the bottom offers "Create new file…" — enter a .py filename and the file is created in the workspace root.

After insertion:

  • The file opens and the cursor is placed directly on the raise NotImplementedError(...) body line so you can start typing the implementation immediately
  • The file is saved automatically so the FileSystemWatcher fires and the step cache re-indexes the new definition — the squiggly on your feature file disappears without any manual action
  • The entire operation is a single undoable edit (Ctrl+Z reverts the stub insertion)

Quick Fix


CodeLens — Step Usage Count

Every step definition decorator in a Python file gets a CodeLens line above it showing how many unique scenarios across all feature files use that step.

Used in 3 scenarios
@given(parsers.parse("the user {username} is logged in"))
def step_the_user_username_is_logged_in(username):
    ...
  • Click the CodeLens to open the References peek panel showing every scenario that uses the step, grouped by feature file with jump-to-line navigation
  • The count is per unique scenario (not per step occurrence), so a step used twice in the same scenario counts as 1
  • Lens counts update automatically when Python files or feature files change on disk
  • Debounced refresh — rapid saves (e.g. auto-save) are collapsed into a single lens refresh to avoid flicker

Code Lens


BDD Runner - Optional

GherkinLens can also add a lightweight BDD runner to VS Code's native Testing view. It is disabled by default so the extension keeps its normal no-pytest startup behavior.

Runner

  • Run or debug the current feature, scenario, scenario outline, or rendered example row
  • Groups feature files by their actual workspace folders in the native Testing view
  • Labels BDD node types clearly as Feature, Scenario, Scenario Outline, Examples, and Example
  • Run or debug by tag expression, such as @smoke, @negative, or @smoke and not @wip
  • Optional terminal commands run the same mapped pytest node IDs in an integrated terminal for colored pytest output
  • Uses fast TypeScript feature parsing for the tree, then lazily runs pytest collection only when node-id mapping is needed
  • Uses pytest hooks and structured JSON from the bridge script instead of parsing plain terminal output

Enable it with:

{
  "gherkinLens.runner.enabled": true
}

Status Bar

A persistent status bar item appears on the right side of the VS Code status bar after indexing completes.

Display Meaning
✓ 42 steps Indexing complete, all open steps matched
✓ 42 steps ⚠ 3 unmatched 3 steps in open files have no matching definition
✓ 42 steps 🛇 Auto re-index is off — the cache will not update on file save
✓ 42 steps ⚠ 3 unmatched 🛇 Both conditions active
  • Click the status bar item to run GherkinLens: Show Cache Statistics
  • The tooltip shows the full count: GherkinLens: 42 step definitions in 7 files
  • When auto re-index is off, the tooltip adds: Auto re-index is OFF — run Reindex manually

Syntax Highlighting

GherkinLens registers a full TextMate grammar for the Gherkin language (.feature files) covering:

  • Block keywords: Feature, Rule, Background, Scenario, Scenario Outline, Scenario Template, Example, Examples, Scenarios
  • Step keywords: Given, When, Then, And, But
  • Tags (@tagName)
  • Step parameters ("quoted strings" and <angle bracket placeholders>)
  • Data table cell separators and content
  • Docstrings (triple-quote """ and backtick ``` delimiters)
  • Comments (# ...)

The .feature file icon is also registered for light and dark themes.

Syntax


Document Formatting

Format any .feature file with Shift+Alt+F or via GherkinLens: Format Feature File.

GherkinLens implements a complete Gherkin formatter that enforces modern style without any external tool dependency.

Format

Indentation Hierarchy

With the default indentSize of 2 spaces:

Feature: User authentication        # level 0
  Background:                       # level 1
    Given the database is running   # level 2

  Scenario: Successful login        # level 1
    Given the login page is open    # level 2
    When the user enters "alice"    # level 2
    Then the dashboard is shown     # level 2
      | column | value |            # level 3 (data table)
      """                           # level 3 (docstring delimiter)
      content
      """                           # level 3

  Rule: Admin users                 # level 1
    Scenario: Admin panel access    # level 2 (inside Rule)
      Given the user is an admin    # level 3

Blank Line Policy

Location Blank lines enforced
Before Background:, Scenario:, Scenario Outline:, Rule:, Examples: Exactly 1
Before Feature: 0 (always first)
Between tags and their element 0
Between a step and its data table 0
Between a step and its docstring 0
Consecutive blank lines anywhere Collapsed to 1

Table Column Alignment

All pipe-delimited tables (data tables and Examples tables) are automatically realigned so every column is padded to the width of its longest cell:

# Before formatting
| Name | Age | City |
| Alice | 30 | New York |
| Bob | 25 | LA |

# After formatting
| Name  | Age | City     |
| Alice | 30  | New York |
| Bob   | 25  | LA       |

Keyword Casing

The gherkinLens.format.keywordCase setting controls how keywords are written:

Mode Example
title (default) Feature:, Scenario:, Given, When, Then
lower feature:, scenario:, given, when, then
upper FEATURE:, SCENARIO:, GIVEN, WHEN, THEN
preserve No changes to keyword casing

Docstring Content Preservation

Lines inside """ or ``` docstrings are passed through as-is (only trailing whitespace is trimmed). Only the opening and closing delimiters are re-indented. The formatter never alters the content you wrote inside a docstring.

Tags

Tags are attached to their element without any blank line between them, but the blank line before the tag group (and its element) is preserved:

  @smoke @regression
  Scenario: Login with valid credentials

Rule Blocks

Rule: blocks increase the indentation of everything inside them by one level. Consecutive Rule: blocks do not compound — each resets to the correct baseline:

Feature: Shopping cart

  Rule: Guest users
    Scenario: Add to cart
      Given I am not logged in

  Rule: Authenticated users
    Scenario: Save for later
      Given I am logged in

Single Undo

The entire format operation is applied as a single TextEdit.replace, so one Ctrl+Z reverts the whole document to its pre-format state.


Live File Watching

GherkinLens watches both Python step files and feature files for changes on disk:

  • Python files — when a step definition file is created, modified, or deleted, the cache updates automatically (respects the autoReindex setting)
  • Feature files — when a .feature file is created, modified, or deleted, the CodeLens usage index updates automatically
  • Watchers respect the excludePattern setting — virtual environments and build directories are never re-indexed

Comment-Aware Indexing

Decorators that appear after a # on the same line are never indexed. Commenting out a step definition removes it from the cache on the next re-index.

# @given("this step is disabled and will not appear in completions")
@given("this step is active")
def step_active():
    ...

Framework Support — pytest-bdd & behave

GherkinLens supports both pytest-bdd and behave out of the box for editor intelligence. Go to Definition, Hover, Autocomplete, Diagnostics, Quick Fix, CodeLens, Formatting, and step indexing work with both frameworks.

The optional BDD runner currently targets pytest-bdd projects.

Auto-Detection

By default (gherkinLens.framework: "auto"), GherkinLens reads the import statements in your step files and detects the framework automatically:

  • from pytest_bdd import ... → activates pytest-bdd mode
  • from behave import ... → activates behave mode

No configuration needed for most projects.

How to Change the Framework

Via Settings UI:

  1. Ctrl+Shift+P → Open Settings (UI)
  2. Search gherkinLens
  3. Find Framework → choose auto, pytest-bdd, or behave from the dropdown

Via .vscode/settings.json (recommended for teams):

{
  "gherkinLens.framework": "behave"
}

Committing this file ensures everyone on the team gets the correct framework automatically without any manual setup.

Via User Settings (JSON):

"gherkinLens.framework": "pytest-bdd"

Changing the setting triggers an automatic re-index.

Framework Differences

Behaviour pytest-bdd behave
Parameterised pattern parsers.parse("the user {name}") "the user {name}" (bare string)
Regex pattern parsers.re(r"the user (\w+)") use_step_matcher("re") before decorator
Generated stub imports from pytest_bdd import given, when, then, step, parsers from behave import given, when, then, step
Generated stub signature def step_name(param): def step_name(context, param):
Step file discovery *_steps.py, test_*.py, conftest.py above + **/steps/*.py

behave: Regex Steps with use_step_matcher

GherkinLens tracks use_step_matcher() calls inside each file and applies the correct matching mode to every decorator that follows it:

from behave import given, when, then, use_step_matcher

use_step_matcher("re")

@given(r"the user (?P<username>\w+) logs in")   # treated as regex ✓
def step_user_logs_in(context, username):
    ...

use_step_matcher("parse")

@then("the dashboard shows {count} items")       # treated as parse pattern ✓
def step_dashboard_shows(context, count):
    ...

Commands

Open the Command Palette (Ctrl+Shift+P) and type GherkinLens to see all available commands.

Command Description
GherkinLens: Reindex Step Definitions Fully re-scan all Python step files and rebuild the feature usage index. Use this after toggling Auto Re-index off, or after large batch changes.
GherkinLens: Show Cache Statistics Display a notification with the total number of indexed step definitions and the number of Python files they come from. Also accessible by clicking the status bar item.
GherkinLens: Toggle Auto Re-index Turn automatic re-indexing on or off for the current workspace. Saved as a workspace setting. Useful for very large projects where you prefer to reindex manually.
GherkinLens: Format Feature File Format the currently active .feature file. Equivalent to pressing Shift+Alt+F while a feature file is open.
GherkinLens Runner: Refresh BDD Tests Rebuild the native Testing view tree for feature files and clear stale pytest node-id mappings.
GherkinLens Runner: Run Current BDD Test Run the feature, scenario, outline, or example row at the cursor through VS Code Testing.
GherkinLens Runner: Debug Current BDD Test Debug the feature, scenario, outline, or example row at the cursor through VS Code Testing.
GherkinLens Runner: Run BDD Tag Expression Run tests matching a tag expression such as @smoke and not @wip through VS Code Testing.
GherkinLens Runner: Debug BDD Tag Expression Debug tests matching a tag expression through VS Code Testing.
GherkinLens Runner: Run Current BDD Test in Terminal Run the current BDD item in an integrated terminal with pytest color output.
GherkinLens Runner: Run BDD Tag Expression in Terminal Run a tag expression in an integrated terminal with pytest color output.

Settings

All settings are under the gherkinLens namespace and can be set in User Settings or Workspace Settings.

Indexing

Setting Default Description
gherkinLens.framework "auto" BDD framework used in this project. "auto" detects from import statements in step files. Set to "pytest-bdd" or "behave" to override. Changing this setting triggers an automatic re-index.
gherkinLens.includePattern **/{steps.py,
*steps.py,
test
.py,
*_test.py,conftest.py}
Glob pattern for Python files to scan for step definitions. Adjust this if your step files follow a different naming convention.
gherkinLens.excludePattern **/{node_modules,
.venv,venv,
env,
virtualenv,
.tox,
__pycache__,
dist,
build,
.eggs}/**
Glob pattern for files and directories to skip during indexing. Virtual environments and build directories are excluded by default. Add any additional paths here.
gherkinLens.autoIndexOnStartup true When true, GherkinLens indexes all step definitions automatically when the workspace opens. Disable to skip the startup scan and index manually.
gherkinLens.autoReindex true When true, GherkinLens re-indexes step definitions automatically whenever a Python file matching includePattern is saved, created, or deleted. Disable this for very large projects and use GherkinLens: Reindex Step Definitions on demand. Can also be toggled via the GherkinLens: Toggle Auto Re-index command without opening Settings.

Editor Experience

Setting Default Description
gherkinLens.hover.enabled true When true, hovering a Gherkin step shows the matching decorator, function signature, source path, and open link. Set to false to disable GherkinLens rich hover while keeping navigation and other features enabled.

BDD Runner

Setting Default Description
gherkinLens.runner.enabled false Enables the optional native VS Code Testing runner.
gherkinLens.runner.autoDiscover true Refreshes the BDD tree automatically when feature files change after the runner is enabled.
gherkinLens.runner.pytestArgs [] Extra arguments passed to pytest for discovery and execution.
gherkinLens.runner.featurePattern "**/*.feature" Glob pattern for feature files shown in the BDD runner.
gherkinLens.runner.pythonPath "" Python interpreter for the runner. Leave blank to use the Python extension interpreter, python.defaultInterpreterPath, or python.
gherkinLens.runner.verboseLogs false Writes detailed runner diagnostics to Output: GherkinLens, including mapping inputs and sampled pytest discovery JSON.

For runner troubleshooting, set:

{
  "gherkinLens.runner.verboseLogs": true
}

Then open Output -> GherkinLens, run GherkinLens: Refresh BDD Tests, and retry the failed run/debug action. The useful lines start with [runner], [runner:warn], or [runner:debug].

Formatting

Setting Type Default Description
gherkinLens.format.indentSize number (1–8) 2 Number of spaces per indent level when formatting .feature files. Applies to all indented elements: scenarios, steps, table rows, and docstring delimiters.
gherkinLens.format.keywordCase string (enum) "title" Casing applied to Gherkin keywords when formatting. "title" produces Feature, Scenario, Given; "lower" produces feature, scenario, given; "upper" produces FEATURE, SCENARIO, GIVEN; "preserve" leaves keyword casing untouched.

Smart Matching

GherkinLens supports the three pattern types used by pytest-bdd:

Plain Strings

@given("the login page is open")

Matched by direct string comparison (case-insensitive, normalizing ' to ").

parsers.parse Patterns

@given(parsers.parse("the user {username} logs in as {role}"))

{param} placeholders are converted to a regex capture group (.+?) for matching. The step text the user alice logs in as admin will match.

parsers.re Patterns

@given(parsers.re(r"the user (?P<username>\w+) logs in"))

Python-specific regex syntax is translated to JavaScript-compatible equivalents before matching:

  • (?P<name>...) named groups → (?<name>...)
  • (?P=name) backreferences → \k<name>
  • Inline flags (?imsx) are extracted and applied as regex flags

Scoring and Ranking

When multiple definitions could match a step, GherkinLens ranks them by confidence:

  1. Exact string match (score 1000) — the normalized pattern equals the step text exactly
  2. Regex match with parsers.re (score 500)
  3. Word overlap score for parsers.parse patterns — a combined metric of keyword overlap ratio, string length similarity, and word count similarity. Patterns scoring below 50% word overlap are discarded

Performance Tips for Large Projects

Narrow the Include Pattern

The default includePattern already pre-filters to common step file naming conventions. If your project has a specific layout, narrow it further:

"gherkinLens.includePattern": "**/tests/steps/**/*.py"

Expand the Exclude Pattern

Make sure your virtual environment and any generated code directories are excluded:

"gherkinLens.excludePattern": "**/{node_modules,.venv,venv,env,virtualenv,.tox,__pycache__,dist,build,.eggs,.mypy_cache,.pytest_cache}/**"

Disable Auto Re-index

For projects with hundreds of Python files, turn off automatic re-indexing so the cache only rebuilds when you explicitly ask for it:

"gherkinLens.autoReindex": false

Or toggle it on/off quickly without touching settings via GherkinLens: Toggle Auto Re-index. The status bar will show 🛇 when auto re-index is off as a reminder to reindex manually after making changes.


How It Works

GherkinLens scans Python files using a regular expression that matches the decorator pattern:

@(given|when|then|step)\s*(\s*parsers\.(parse|re)\s*)?\s*r?(['"])(.*?)\4

For editor intelligence, GherkinLens never imports or executes your Python code. Parsing is done entirely from source text, which means:

  • No Python interpreter required in VS Code
  • Works with any Python version your project uses
  • Virtual environments are irrelevant to indexing
  • No pytest plugins or conftest discovery needed

The step cache holds all definitions grouped by decorator type (given, when, then). @step definitions are expanded into all three types at index time. The feature usage index is a separate, bidirectional map from step definitions to the feature file lines that use them — this is what powers the CodeLens scenario counts.

Both indexes are rebuilt in parallel batches and emit change events to keep all providers (diagnostics, CodeLens, hover, completions) synchronized.

When the optional pytest-bdd runner is enabled, GherkinLens creates the Testing view tree from .feature files first, then lazily invokes pytest only for discovery, run, debug, or terminal runner commands.


Extension Settings Reference (JSON)

{
  // ── Framework ─────────────────────────────────────────────────────────────
  // "auto" | "pytest-bdd" | "behave"
  "gherkinLens.framework": "auto",

  // ── Indexing ──────────────────────────────────────────────────────────────
  // Glob pattern for Python step definition files to index
  "gherkinLens.includePattern": "**/{*_steps.py,*steps.py,test_*.py,*_test.py,conftest.py}",

  // Glob pattern for files/dirs to exclude (virtual envs, build output, etc.)
  "gherkinLens.excludePattern": "**/{node_modules,.venv,venv,env,virtualenv,.tox,__pycache__,dist,build,.eggs}/**",

  // Index step definitions automatically when the workspace opens
  "gherkinLens.autoIndexOnStartup": true,

  // Re-index automatically when Python step files change on disk
  // Disable for large projects and reindex manually
  "gherkinLens.autoReindex": true,

  // Show rich hover details for matched Gherkin steps
  "gherkinLens.hover.enabled": true,

  // Enable the optional native VS Code Testing runner for pytest-bdd
  "gherkinLens.runner.enabled": false,

  // Refresh the BDD runner tree when feature files change
  "gherkinLens.runner.autoDiscover": true,

  // Extra pytest arguments used by runner discovery and execution
  "gherkinLens.runner.pytestArgs": [],

  // Feature files shown in the BDD runner
  "gherkinLens.runner.featurePattern": "**/*.feature",

  // Python interpreter used by the BDD runner.
  // Leave blank to use the Python extension interpreter, python.defaultInterpreterPath, or python.
  "gherkinLens.runner.pythonPath": "",

  // Write detailed runner diagnostics to Output: GherkinLens
  "gherkinLens.runner.verboseLogs": false,

  // ── Formatting ────────────────────────────────────────────────────────────
  // Spaces per indent level when formatting .feature files (1–8)
  "gherkinLens.format.indentSize": 2,

  // Keyword casing: "title" | "lower" | "upper" | "preserve"
  "gherkinLens.format.keywordCase": "title"
}

Release Notes

1.2.2

Runner mapping fix

  • Fixed scenario runs matching every pytest-bdd item from the same feature file
  • Scenario, outline, and example row runs now require a scenario identity match before pytest node IDs are selected

Runner interpreter resolution

  • Improved BDD runner interpreter detection using the Python extension API, workspace settings, and common workspace virtual environments before falling back to python
  • Added verbose runner diagnostics for interpreter selection, pytest discovery, and BDD-to-pytest node-id mapping

Optional BDD runner

  • Added an optional native VS Code Testing runner for pytest-bdd feature files
  • Shows a BDD-first tree for features, scenarios, scenario outlines, examples, and rendered example rows
  • Supports run/debug for the current BDD item and tag expressions such as @smoke and not @wip
  • Keeps pytest discovery lazy so pytest is not run on extension startup

1.1.1

Hover preference

  • Added gherkinLens.hover.enabled so users can disable rich Gherkin step hover details while keeping Go to Definition, Ctrl+Click navigation, diagnostics, autocomplete, CodeLens, and formatting enabled

1.1.0

behave framework support

  • GherkinLens now works with both pytest-bdd and behave projects
  • New gherkinLens.framework setting — "auto" (default), "pytest-bdd", or "behave"
  • Auto-detection reads import statements in step files — no configuration needed for most projects
  • behave file discovery — step files in **/steps/*.py are automatically scanned alongside the configured includePattern
  • use_step_matcher tracking — regex steps declared with use_step_matcher("re") are correctly matched as regex patterns; parse and cfparse steps are handled via {param} placeholder matching
  • Framework-aware Quick Fix — generated stubs use from behave import ..., include context as the first parameter, and never wrap patterns in parsers.parse()
  • Changing the gherkinLens.framework setting triggers an automatic re-index

1.0.1

  • Updated marketplace listing with detailed README and screenshots

1.0.0

Initial release:

  • Go to Definition, Hover, and Ctrl+Hover underline
  • Autocomplete with tab-stop navigation and snippet session tracking
  • Diagnostics (warning squiggles and Problems panel integration)
  • Quick Fix: "Create step definition" with smart pattern generation, import handling, and auto-save
  • CodeLens: per-definition scenario usage count with peek references
  • Status bar: step count, unmatched count, and auto re-index state indicator
  • Full Gherkin syntax highlighting (TextMate grammar)
  • Document formatting: indentation, blank-line policy, table alignment, keyword casing, docstring passthrough, Rule block nesting
  • Live file watching for Python step files and feature files
  • Comment-aware indexing

Keyboard Shortcuts

Action Default Shortcut
Go to Definition F12 or Ctrl+Click
Peek Definition Alt+F12
Format Feature File Shift+Alt+F
Quick Fix (lightbulb) Ctrl+.
Trigger Completions Ctrl+Space
Show Problems panel Ctrl+Shift+M

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft