Setup an IDE for Reqnroll¶
Tip
Reqnroll can be used without any IDE integration as well, so setting up the IDE is optional.
Setting up the Integrated Development Environment (IDE) integration for Reqnroll can add convenience and productivity features like:
Adding new project elements, like feature files based on templates
Syntax coloring of feature files
Showing suggestions (completions) for Gherkin syntax keywords
Navigating between steps and step definitions
Adding step definition snippets to your codebase for undefined steps
This guide describes the setup steps for the following IDEs:
Setup Visual Studio 2022¶
In order to use Reqnroll with Visual Studio 2022, you need to install the Reqnroll for Visual Studio 2022 extension.
Warning
The Reqnroll with Visual Studio 2022 extension cannot work together with the SpecFlow for Visual Studio 2022 extension, as they both process feature files. As the Reqnroll extension also supports SpecFlow projects, you can remove the SpecFlow extension if you install the Reqnroll extension. Alternatively, you can disable the SpecFlow extension for the time you work with Reqnroll.
Open Visual Studio 2022
From the Extensions menu, choose the Manage Extensions… command.
On the dialog, make sure that Online is selected from the list on the left and type
Reqnroll
to the Search text box on the right top corner.Choose the Reqnroll for Visual Studio 2022 from the list and click on the Download button.
Restart Visual Studio 2022.
For more details about the Reqnroll with Visual Studio extension, please check the Reqnroll Visual Studio integration page.
Hint
The Reqnroll Visual Studio extension cannot be used for Visual Studio for Mac. On macOS we recommend using Visual Studio Code.
Setup Visual Studio Code¶
For using Reqnroll with Visual Studio Code, you can choose from multiple available extensions. We recommend using the Cucumber extension.
In order to use the navigation features of the extension, you should configure the location of your feature files and step definition classes within your repository.
The following Visual Studio configuration shows a typical configuration.
{
"explorer.fileNesting.patterns": { // shows *.feature.cs files as nested items
"*.feature": "${capture}.feature.cs"
},
"files.exclude": { // excludes compilation result
"**/obj/": true,
"**/bin/": true,
},
"cucumber.glue": [ // sets the location of the step definition classes
"MyReqnrollProject/**/*.cs",
],
"cucumber.features": [ // sets the location of the feature files
"MyReqnrollProject/**/*.feature",
]
}
Setup Rider¶
In order to use Reqnroll with Rider, you need to install the Reqnroll for Rider extension.
Warning
The Reqnroll with Rider extension cannot work together with the SpecFlow for Rider extension, as they both process feature files. As the Reqnroll extension also supports SpecFlow projects, you can remove the SpecFlow extension if you install the Reqnroll extension. Alternatively, you can disable the SpecFlow extension for the time you work with Reqnroll.
Launch Rider and ensure you are using a compatible version. The following versions have been verified to work with Reqnroll:
Top right of Rider click the gear icon and press plugins.
Click
Marketplace
.Enter
Reqnroll
in the search box and install.Open csproj and verify your project contains
<ItemGroup> <Content Include="**/*.feature"/> </ItemGroup>
This is a work around for a known issue found here Content Include .feature files in .csproj
Restart Rider.