VSOguretz
A VS Code extension for running BDD/Cucumber tests in Flutter projects directly from .feature files.
Note: This is a VS Code port/fork of Knopkaogurec, originally developed as an IntelliJ IDEA plugin by Artur Ishmurzin.
Features
- Run/Debug Tests from Editor - CodeLens buttons appear directly on Feature and Scenario lines
- Run Test at Cursor - Execute only the scenario where your cursor is positioned
- Auto-generate Dart Tests - Converts
.feature files to .feature.dart test files
- Go to Definition - Navigate from Gherkin steps to their Dart implementations
- Auto-completion - Suggests step definitions and Gherkin keywords as you type
- Multi-language Support - Supports Russian and other Gherkin localizations
- Step Definition Matching - Automatically matches steps to
@StepDef annotations in Dart code
Installation
- Download the
.vsix file from releases
- In VS Code, open Command Palette (
Cmd+Shift+P / Ctrl+Shift+P)
- Run
Extensions: Install from VSIX...
- Select the downloaded file
Usage
Running Tests
- Click Run or Debug CodeLens buttons above Feature/Scenario lines
- Use keyboard shortcuts:
Cmd+Shift+R (Mac) / Ctrl+Shift+R (Windows) - Run test at cursor
Cmd+Shift+D (Mac) / Ctrl+Shift+D (Windows) - Debug test at cursor
Commands
| Command |
Description |
VSOguretz: Run All Tests |
Run all scenarios in current feature file |
VSOguretz: Run Test at Cursor |
Run scenario at cursor position |
VSOguretz: Debug All Tests |
Debug all scenarios in current feature file |
VSOguretz: Debug Test at Cursor |
Debug scenario at cursor position |
VSOguretz: Refresh Step Definitions |
Reload step definitions from Dart files |
Configuration
Configure the extension in VS Code settings (Cmd+, / Ctrl+,):
| Setting |
Default |
Description |
vsoguretz.featureFilesPath |
integration_test/features |
Directory containing .feature files |
vsoguretz.stepDefinitionsPath |
integration_test/step_definitions |
Directory containing step definition files |
vsoguretz.generatedTestPath |
integration_test/generated |
Output directory for generated test files |
vsoguretz.testFilePath |
lib/main_test.dart |
Main test entry point |
vsoguretz.flutterPath |
flutter |
Path to Flutter SDK |
vsoguretz.device |
chrome |
Target device (chrome, macos, linux, etc.) |
vsoguretz.browserFlags |
--disable-web-security |
Browser flags for web testing |
vsoguretz.wordingFilePath |
`` |
Path to Gherkin localization YAML file |
Requirements
- VS Code 1.85.0 or higher
- Flutter SDK
- Dart SDK
Development
Building from Source
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode for development
npm run watch
# Lint code
npm run lint
Testing
Press F5 in VS Code to launch the extension in a new Extension Development Host window.
Credits
This extension is based on the original Knopkaogurec IntelliJ IDEA plugin by Artur Ishmurzin.
License
MIT
| |