SpecFlowOSS / SpecFlow.Rider

SpecFlow support for both ReSharper and Rider
MIT License
29 stars 19 forks source link

Step definitions declared in an external assembly disappear after running debugger #182

Open GedasFX opened 2 years ago

GedasFX commented 2 years ago

Rider 2022.2.3 SpecFlow for Rider 1.14.2

If you have bindings in an external assembly and one of those bindings is a static class, all binding classes alphabetically after that class get dropped after you start running debugger.

Example:

class DatabaseSteps
class HttpSteps
static class InfrastructureSteps
class RequestSteps
class ResponseSteps

In this example, when you first launch Rider, all bindings will be loaded, and no missing step definition highlighting will be present. After running tests, it will continue to be the case. The moment you run tests with debugger, step definitions from RequestSteps and ResponseSteps will disappear, and warning lines for missing definitions will appear. The tests will pass as the definitions will still be picked up by the test runner and it's only a visual bug.

To work around this, I removed the static keyword and the plugin started to behave normally.

Socolin commented 11 months ago

Hello,

It would help to provide a repro and maybe check the logs too (see backend.log), the error you describe look like an exception during the update of the cache (interrupting the process in the middle)