Replies: 3 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
@nicojs Welcome here. You are absolutely right, but the situation is not that easy. The SpecFlow+ Runner (aka SpecRun) was an implementation that did exactly this (unfortunately closed source), however it turned out, that
I don't know how the big frameworks, like xunit, etc. have overcome these problems. Maybe they had more capacity or were better informed. Anyhow, it was not easy at all. It felt at the end like completely rewrite xUnit. An alternative approach I tried is to use the xUnit dynamic test registration framework that basically achieved the same. You can still find that among my GitHub repos and that is definitely a good showcase of how the dynamic execution could be done: https://github.com/gasparnagy/SpecFlow.xUnitAdapter. At the end it turned out that ReSharper does not support that interface and xUnit was lacking some features that are important for acceptance tests (like recording an attachment), so it was not picked up. (Also there were some strange stability issues.) All these info are from 2018, so things might have changed and we can reconsider this again. I cross-link this discussion with the Roslyn Source Generator that is basically trying to achieve a similar goal with a different approach. But some of the questions (e.g. the necessity of generator plugins) is the same. |
Beta Was this translation helpful? Give feedback.
-
From everything mentioned here, this sounds like a considerable amount of work to achieve, even if we were to ignore the maintenance overheads of supporting It doesn't feel like a justified effort just to get rid of code-behind files. Could you provide a couple of additional reasons that might make the effort worth it? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there 🙋♂️. Congrats on this fork 🍴🎉
I have been asking myself for a couple of years now why SpecFlow (and now Reqnroll) would use a test framework to 'piggyback' on. I think this makes for an overly complicated programming model:
It must be possible to run spec files directly. Indeed, this is how the cucumber family of frameworks works as well.
After some searching, I am convinced that this is possible:
dotnet test
scans your project for*.TestAdapter.dll
files: linkWould you be interested in such a feature?
Beta Was this translation helpful? Give feedback.
All reactions