Closed baynezy closed 1 year ago
You learn every day something new. I am using xUnit for years, but I never heard until now about the BeforeAfterTestAttribute
.
I have to look into it, what it is and why it doesn't work.
Ok, found the issue.
The [UsesVerify]
attribute has to be on the generated test classes and not on the binding classes.
Should be not that hard to create a generator plugin that adds it to the generated code.
Thanks @SabotageAndi I have been looking at what is involved for this. I have some questions, but joining the Discord channel link at the bottom of the page keeps failing. Can you help?
Ok, Discord Link was broken. This is the right one: https://discord.com/invite/xQMrjDXx7a
I started yesterday to quickly create a plugin for this. I hope I can finish it today or tomorrow.
Draft PR is here: https://github.com/SpecFlowOSS/SpecFlow/pull/2602
That's incredible. Thanks.
@SabotageAndi thank you for adding the generator plugin, I think that this one will be something for the long run now?
So, Verify support is available. Needed NuGet package: https://www.nuget.org/packages/SpecFlow.Verify/4.0.16-beta Example: https://github.com/SpecFlowOSS/SpecFlow-Examples/tree/master/Verify/VerifyExample
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
SpecFlow Version
3.9.22
Which test runner are you using?
xUnit
Test Runner Version Number
3.9.22
.NET Implementation
.NET 5.0
Project Format of the SpecFlow project
Classic project format using
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Command line – PLEASE SPECIFY THE FULL COMMAND LINE
SpecFlow Section in app.config or content of specflow.json
Issue Description
I am trying to use the Verify testing library with SpecFlow. Sadly it is incompatible as it appears SpecFlow does not support xunits
BeforeAfterTestAttribute
I have this confirmed by the project lead on Verify in this PR he helped me with.
Is this something that would be supported?
Steps to Reproduce
Checkout this repro case
Run
dotnet test
Link to Repro Project
https://github.com/baynezy/SpecFlowVerifyIssue