Gauge extension for Visual Studio Code
$ code --install-extension getgauge.gauge
Other Install options
- Create New Project
- Code Completion
- Goto Definition
- Diagnostics
- Format Specifications
- References
- Symbols
- Run Specs/Scenarios
- Debug Specs/Scenarios
- Reports
- Test Explorer
- Code Snippets
Gauge langauge plugins supported by the Gauge Visual Studio Code plugin are:
Execute the Command Gauge: Create new Gauge Project
and select the appropriate template to create a new Gauge Project
* Gauge: Create a new Gauge Project
* Gauge: Create a new Specification
* Gauge: Find Step References
* Gauge: Optimize VS Code Configuration for Gauge
* Gauge: Run All Specification
* Gauge: Run Specification
* Gauge: Run Scenarios
* Gauge: Run Scenario At Cursor
* Gauge: Repeat Last Run
* Gauge: Re-Run Failed Scenario(s)
* Gauge: Show Last Run Report
* Gauge: Stop current gauge execution
* Gauge: Report Issue
* Test: Focus on Gauge Specs View
Suport for Debugging of step implementations in JS, Python and Ruby
View execution reports inside VS Code
To invoke a snippet type any of the following snippet keywords and Ctrl+space
spec
- for specificationsce
- for scenariotable:1
- table with one columntable:2
- table with two columnstable:3
- table with three columnstable:4
- table with four columnstable:5
- table with five columnstable:6
- table with six columns
To override default configurations in VSCode settings
gauge.launch.enableDebugLogs
: Starts gauge lsp server with log-leveldebug
, defaults tofalse
gauge.execution.debugPort
: Debug port, defaults to9229
gauge.notification.suppressUpdateNotification
: Stops notifications for gauge-vscode plugin auto-updates, defaults tofalse
gauge.create.specification.withHelp
: Create specification template with help comments, defaults totrue
To specify the execution options for the tests, add a "type":"gauge"
entry with "request":"test"
to launch.json
.
The options of the gage run command are available as properties of the entry. For Maven and Gradle plugins, the corresponding arguments are supported.
If there are multiple "request":"test"
entries in launch.json
, the first definition will be used.
$ npm run build
This will create gauge-<version>.vsix
file which can be installed via VScode's Install from VSIX.
Note: Manually delete the Gauge extension folder from VSCode extensions folder for a successful uninstallation of VSCode extension
If gauge features are not activated, check file associations for .spec
and .cpt
it maybe used by another plugin. To fix this, add this to user settings
"files.associations": {
"*.spec": "gauge",
"*.cpt": "gauge"
}
Refer our Troubleshooting guide
Please see below for the best place to ask a query:
- How do I? -- Stack Overflow
- I got this error, why? -- Stack Overflow
- I got this error and I'm sure it's a bug -- file an issue
- I have an idea/request -- file an issue
- Why do you? -- Google Groups
- When will you? -- Google Groups