Reqnroll
Reqnroll copied to clipboard
Add Roslyn source generator
🤔 What's changed?
Adds new Roslyn-based source generator to convert feature files into executable tests.
⚡️ What's your motivation?
🏷️ What kind of change is this?
- :zap: New feature (non-breaking change which adds new behaviour)
♻️ Anything particular you want feedback on?
- The code structures for the modelling of features and scenarios
- The models for test fixtures and methods
- The mechanisms for rendering source code
- The tests to validate surface-level code generation
📋 Checklist:
- [x] I've changed the behaviour of the code
- [x] 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.
Tracking review notes:
- [x] Review note 1: opt-in behavior
- [ ] Review note 2: Delete
*.feature.cs
files - [ ] Review note 3: how to configure / editorconfig
- [x] Review note 4: test execution does not utilize incremental gen, always builds (accepted limitation)
- [x] Review note 5: performance degradation of incremental command line build (accepted limitation)
- [x] Review note 6: Namespace of generated classes in feature files in sub folders
- [ ] Review note 7: rename project and nuget package
- [ ] Review note 8: nullable warnings
- [x] Review note 9:
<PrivateAssets>
and<IncludeAssets>
- [x] Review note 10: breakpoint highlight column alignment issue
- [ ] Review note 11: navigate to feature file from test explorer
- [x] Review note 12: Debugger.Launch()
- [x] Review note 13: scenario changes are not immediately reflected in the generated code
- [x] Review note 14: test discovery does not utilize incremental gen (accepted limitation)
- [x] Review note 15: wrong source info for errors generated for syntax errors
- [x] Review note 16: shifted line/column for errors generated for syntax errors during build
- [x] Review note 17: duplicated errors after build (accepted limitation)
- [ ] Review note 18: missing new lines in generated code of scenario outline
- [ ] Review note 19: Compilation error when scenario outlines used for MsTest v3
- [ ] Review note 20: DataTables and DocString parameters are not supported.
- [ ] Review note 21: The scenario description is not passed to the ScenarioInfo.
- [ ] Review note 22: Disable MsBuild gen variables (e.g.
ReqnrollFeatureFiles
) when Roslyn gen is active - [ ] Review note 23: CSharpSyntax.CreateIdentifier special handling
- [ ] Review note 24: Scenario outline parameter substitutions for special cases
- [ ] Review note 25: Scenario outline special example headers
- [ ] Review note 26: Scenario outline empty example headers
- [ ] Review note 27: Scenario outline duplicate example headers
- [ ] Review note 28: Support allowRowTests=false
- [ ] Review note 29: support generator/addNonParallelizableMarkerForTags
- [x] Review note 30: Support backgrounds
- [ ] Review note 31: shared extended gherkin parser / additional validations
- [ ] Review note 32:
emitIgnoredExamples
config
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.