Gherkin Links
Description
Gherkin Links is a Visual Studio Code extension that enhances your .feature files by making specific tags clickable. When configured, tags in your feature files will be underlined and can be clicked to open a link in your browser.
Features
Automatically detects and highlights tags specified in the gherkin-links.json configuration file, this file can be anywhere on the project.
Clickable tags that open the configured URL with the tag as the endpoint.
Configure the Extension:
Create a file named gherkin-links.json at the root of your project.
Define your supportedTags and baseUrl in the JSON file as shown below:
{
"testLinkProvider": {
"supportedTags": ["example"],
"baseUrl": "https://google.com"
}
}
Add Tags in Your Feature Files:
Add tags in your .feature files in the format @tag-123. For example, @example-123.
Click on Tags:
Tags that match the configured supportedTags will be underlined and clickable. Clicking on a tag will open the configured baseUrl with the tag as the endpoint.
For example, clicking on @example-123 will open https://google.com/example-123 in your browser.
Example
Given the following configuration in gherkin-links.json:
{
"testLinkProvider": {
"supportedTags": ["example"],
"baseUrl": "https://google.com"
}
}
And a .feature file with the following content:
Feature: Sample Feature
@example-123
Scenario: Sample Scenario
Given a sample step
When another sample step
Then a final sample step
The tag @example-123 will be underlined and clickable. Clicking it will open https://google.com/example-123 in your default browser.
Installation
1.Open Visual Studio Code.
2.Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
3.Search for "Gherkin Links".
4.Click Install.
Requirements
Visual Studio Code version 1.80.0 or higher.
Known Issues
None at this time.
Release Notes
1.0.0
Initial release of Gherkin Links.