Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step definitions not being found for external step assembly #11

Open
nieldy opened this issue May 16, 2024 · 2 comments
Open

Step definitions not being found for external step assembly #11

nieldy opened this issue May 16, 2024 · 2 comments

Comments

@nieldy
Copy link

nieldy commented May 16, 2024

I have a lot of common steps in an external NuGet package. The assembly is referenced under stepAssemblies in the specflow.json file. I.e.

{
  "stepAssemblies": [
    {
      "assembly": "Platform.SpecFlow"
    }
  ]
}

I'm finding that the external steps aren't being recognised in the feature files. I get the warning Cannot find a matching step definition and no auto-completion hints when typing a step. The step however does run correctly when the test is executed. Note that steps defined within the test project itself are being recognised correctly.

I have tried restarting Rider, unloading and re-loading the project and disabling and re-enabling the plugin.

Note that the package is still using SpecFlow (not Reqnroll). The test project that's referencing the assembly is also using SpecFlow.

I'm running tests using SpecFlow.MsTest.

@initfrank
Copy link

I can confirm this issue is still happening. I switched everything from Specflow to Reqnroll and my step definitions are not being recognized from an external assembly (also using reqnroll).

this is my reqnroll.json file

{
  "$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",

  "bindingAssemblies": [
    {
      "assembly": "StepDefinitions.Base"
    }
  ]
}

@Crafty-Codes
Copy link

Crafty-Codes commented Jun 11, 2024

I have the same problem here.
I tried it with the template reqnroll project with net6.0, net7.0 and net8.0 but all with the same result. Actually net6.0 does work fine but not with cucumber expression, but the others still have the same error Cannot find a matching step definition

dotnet new reqnroll-project -f net6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants