cucumber-official
v1.0.1
Published
Cucumber for Visual Studio Code
Downloads
1
Readme
Cucumber for Visual Studio Code
This extension adds support for using Cucumber with Visual Studio Code, powered by the Cucumber language server.
This extension is maintained by the Cucumber team.
Features
- [x] Auto completion of Gherkin steps
- [x] Syntax highlighting
- [x] Formatting (pretty printing)
- [x] Language support
- [x] C#
- [x] Java
- [ ] JavaScript - help needed
- [x] PHP
- [x] Ruby
- [x] TypeScript
Auto completion
When you start typing a step, you will see auto-complete suggestions based on existing step definitions and Gherkin steps.
The suggestions are more helpful if your step definitions use Cucumber Expressions but you'll also get suggestions if they use Regular Expressions.
Syntax highlighting
The syntax highlights highlights Gherkin keywords and step parameters. Undefined steps and syntax errors are underlined.
Formatting
When choosing to format a Gherkin document, it will be formatted using two space indentation. Numeric cells are right-aligned (as in Excel), and other cells are right-aligned.
Extension Settings
cucumber.features
The cucumber.features
setting can be used to speciy where the extension
should look for .feature
files.
Default value:
{
"cucumber.features": [
"features/**/*.feature",
"src/test/**/*.feature"
]
}
cucumber.glue
The cucumber.glue
setting can be used to speciy where the extension
should look for source code where step definitions are defined.
Default value:
{
"cucumber.glue": [
"features/**/*.php",
"features/**/*.rb",
"features/**/*.ts",
"src/test/**/*.java",
"*specs*/**/.cs"
]
}
cucumber.parameterTypes
The cucumber.parameterTypes
setting can be used to define Custom Parameter Types that are not directly visible in the source code.
Default value:
{
"cucumber.parameterTypes": []
}
For example, if you're using the actor
parameter type from @cucumber/screenplay you'll have to declare this in the parameterTypes
setting:
{
"cucumber.parameterTypes": [
{ "name": "actor", "regexp": "[A-Z][a-z]+" }
]
}
Feedback
If you discover a bug, or have a suggestion for a feature request, please submit an issue.