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.

  1. Open Visual Studio 2022

  2. From the Extensions menu, choose the Manage Extensions… command.

  3. 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.

  4. Choose the Reqnroll for Visual Studio 2022 from the list and click on the Download button.

  5. 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.

.vscode/settings.json
{
  "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.

  1. Launch Rider and ensure you are using a compatible version. The following versions have been verified to work with Reqnroll:

  2. Top right of Rider click the gear icon and press plugins.

  3. Click Marketplace.

  4. Enter Reqnroll in the search box and install.

  5. Open csproj and verify your project contains

    <ItemGroup>
      <Content Include="**/*.feature"/>
    </ItemGroup>
    
  6. Restart Rider.