Skip to content

Conversation

@clrudolphi
Copy link
Contributor

This PR replaces part of #121.

🤔 What's changed?

Modified the SnippetsService to generate asynchronous step bindings based upon the StepDefinitionSkeletonStyle setting in the reqnroll.json configuration file.

This PR does NOT include any UI modifications. The behavior is driven solely by the configuration file.

⚡️ What's your motivation?

To ease the developer transition to async step binding methods.

🏷️ What kind of change is this?

  • ⚡ New feature (non-breaking change which adds new behaviour)

♻️ Anything particular you want feedback on?

Anything?

📋 Checklist:

  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "[vNext]" section of the CHANGELOG, linking to this pull request & included my GitHub handle to the release contributors list.

… the reqnroll.json file when generating snippets (sync or async).

Added unit tests for the new skeletonStyle enum deserialization.
Added unit test for the SnippetService.
Added Spec test in the DefineStepsCommand spec for the generation of async and sync snippets.
@clrudolphi clrudolphi requested a review from gasparnagy October 22, 2025 20:40
@clrudolphi clrudolphi self-assigned this Oct 22, 2025
@304NotModified
Copy link
Member

I like to test and review this, but I have hard time to test this. Are there some (easy) steps to follow?

@gasparnagy
Copy link
Contributor

I like to test and review this, but I have hard time to test this. Are there some (easy) steps to follow?

I think it is just

  • having a Reqnroll project
  • set trace/stepDefinitionSkeletonStyle in the config to AsyncCucumberExpressionAttribute (or others from here),
  • maybe build the project
  • add a new undefined step to one of the scenarios
  • invoke "define steps" command from context menu

@304NotModified
Copy link
Member

304NotModified commented Dec 4, 2025

Thanks, but to be more clear, I mean using this branch. With the experimental VS instance most of the time the plugin isn't installed when debugging/running this branch from VS2022 (Haven't tested VS2026). Or sometimes an old version is hanging (and that's hard to see)

Another option is to install it manually but that is cumbersome (multiple restarts VS) and not possible to debug then? (Or could I attach to a process?)

@gasparnagy
Copy link
Contributor

Thanks, but to be more clear, I mean using this branch. With the experimental VS instance most of the time the plugin isn't installed when debugging/running this branch from VS2022 (Haven't tested VS2026). Or sometimes an old version is hanging (and that's hard to see)

Another option is to install it manually but that is cumbersome (multiple restarts VS) and not possible to debug then? (Or could I attach to a process?)

For me the exp hive support from VS2022 was working in a quite stable way. This is my daily routine:

  • I keep the configuration as "TestDebug" - that builds all projects, except the "Reqnroll.VisualStudio.Package". I do my TDD dev that way.
  • Once I want to check it live, I build the "Reqnroll.VisualStudio.Package" from the solution explorer context menu. I observe (double check) that it shows something like his in the build output: 6>Reqnroll.VisualStudio.Package -> W:\Reqnroll\Reqnroll.VisualStudio\Reqnroll.VisualStudio.Package\bin\Debug\net481\Reqnroll.VisualStudio.Package.vsix 6>Rename: bin\Debug\net481\Reqnroll.VisualStudio.Package.vsix -> bin\Debug\net481\Reqnroll.VisualStudio.Package.v2025.3.99999.vsix
  • Then I open the exp hive from start menu ("Start Experimental Instance of Visual Studio 2022") for testing, the package will be loaded automatically. (I use a different color theme for my exp hive instance, so that I can easily spot out)
  • If I need to debug, I attach my normal VS to the exp hive devenv.
  • Once I'm done with testing, I close exp hive instance (otherwise building "Reqnroll.VisualStudio.Package" will not work)

In very rare cases, the exp hive gets corrupted. In this case what I do:

  1. Open exp hive from start menu and uninstall reqnroll extension. I close to make the uninstall fully finished and restart the exp hive again so that it updates all caches to the uninstalled status.
  2. If this does not help (even more rare), I close exp hive and go to the extension install location (for me for VS2022 this is C:\Users\gaspar\AppData\Local\Microsoft\VisualStudio\17.0_d817ce1bExp\Extensions). I delete the "Reqnroll" folder manually. (With a clean setup there should be no other subfolders there.)
  3. If this still does not help (extreme rare), I invoke "Reset the Visual Studio 2022 Experimental Instance" from start menu.

I hope this helps.

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

Successfully merging this pull request may close these issues.

4 participants