SpecFlow.VisualStudio
SpecFlow.VisualStudio copied to clipboard
Rename Step does not rename the method name
Rename Step does not rename the method name It just renames the attribute string regex but not the method name

Although it is not relevant for the running, the method name appears in the logs

We will pretty sure never rename the method of the step when you rename the step. Reason is, that you could have called the step method from another method. So we would have to do a whole rename in the project of the method. That is so out of the scope for us.
@SabotageAndi OK, but this is a big anti pattern to call from one step to another. I have written thousands of scenarios and almost never call from one step to another. There should be a driver pattern and call a different method in the driver class Another option is to make a step method more generic Another option is the have private method for the shared logic and call it from multiple steps But what you're saying is that the rename will make the project in corrupted state that will look corrupted in both when looking at the file and when seeing the logs / test output - just for satisfying anti pattern and edge case scenario???
Yes, they are anti patterns. But they are used out in the world. Sadly :-(. Only renaming the method at the definition would result then in a compile error. So we would break the code of the user. We really try not to make breaking changes and break the user. This would happen here.
But I will reopen this issue. I marked it as PR has to come from community to make it clear that the SpecFlow Team will pretty sure never work on this.
If we get a PR for it, we will happily review it and merge it.
@SabotageAndi Thanks friend!
I think case I think there should be a checkbox (enabled by default?), so the legacy case is also not a problem