-
Notifications
You must be signed in to change notification settings - Fork 9
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
'Find Unused Step Definitions' command doesn't handle 'StepDefinition' attributes well #22
Comments
That makes sense. Reqnroll internally generates three step definition binding from the The improvement could be done by modifying the I think the implementation should:
Do you want to try making a PR for this? |
@gasparnagy Sure I'm happy to contribute, just a couple of questions:
Thanks! |
@UL-ChrisGlew Thank you for taking care of this. For the development experience & debug experience I have updated now the CONTRIBUTION.md guide. That should contain all information. If anything is unclear, please let me know. For pushing the branch: normally new contributors fork the project and make a new branch in their own fork and create a Pull Request from there. But I have added you now to the contributors group (you need to accept the invite), so you should be able to create a branch here. |
@gasparnagy Thanks for sorting that, I can push new branches/etc to the repository now. From the guide it says:
For me, when loading the extension project, I don't see the option to debug, and get the following popup: Normally I'd think it was something with my Visual Studio install, but I'm able to debug/launch other extensions fine. |
That is strange. But I think you can just set the debug config to debug the devenv.exe process (from the vs install location) with the params |
I have checked and indeed the package project cannot be started by default. I might have created a launch profile earlier. Anyway: I have documented the steps to configure the launch profile: https://github.com/reqnroll/Reqnroll.VisualStudio/blob/main/CONTRIBUTION.md#debug-the-visual-studio-package @UL-ChrisGlew I hope it will work for you as well. |
@gasparnagy That worked great, thanks for writing that - hopefully it helps other contributors in the future as well 😃 |
@gasparnagy unrelated to this specific issue, I've noticed that the 'Find Unused Step Definitions' doesn't handle it very well if step definitions are included in a separate project. I've tried to access the context menu option from this separate project and it throws the error below. Is this intended behavior or something that also needs to be fixed? I'm happy to look into this while I'm in this area. |
@UL-ChrisGlew Thx. We were going back and forth with @clrudolphi about how the projects should be handled. So you should definitely check the discussion we had from here down. We also created a scenario to cover the cases, but it can happen that we still miss a combination. |
IIRC we decided to not look at external assemblies because of the risks of false positives. |
Ah okay, it's not as simple as a problem to solve as I first thought - it's not a dealbreaker at the moment for us but would be useful in the future. |
I close this issue now as we will probably not be able to improve this in the close future. If anything comes up, feel free to reopen. |
Used Visual Studio
Visual Studio 2022
Are the latest Visual Studio updates installed?
Yes
Content of reqnroll.json (if present)
{
"bindingCulture": {
"name": "en-GB"
},
"language": {
"feature": "en-GB"
}
}
Issue Description
Step definitions declared with the 'StepDefinition' attribute are showing multiple times inside the new 'Find Unused Step Definitions' menu option. These appear to show Given/Then/When usages, and implies that the Step Definition is unused - which is not always the case.
Is it possible to change this behavior to show which methods decorated with 'StepDefinition' are unused?
Steps to Reproduce
Link to a project repository that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: