Reqnroll icon indicating copy to clipboard operation
Reqnroll copied to clipboard

Reqnroll.xUnit doesn't support xUnit v3

Open thatstatsguy opened this issue 10 months ago • 8 comments

Reqnroll Version

2.2.1

Which test runner are you using?

xUnit

Test Runner Version Number

2.2.1

.NET Implementation

.NET 8.0

Test Execution Method

Other – PLEASE SPECIFY

Content of reqnroll.json configuration file

n/a - doesn't exist in my replication

Issue Description

Hi :)

My team work with XUnit + Reqnroll for our testing. I recently tried bumping xunit to the new v3 only to be greeted with errors relating to the IAsyncLifetime of Xunit v3. I'm aware that there have been changes as per the migration guide from xunit.

Steps to Reproduce

I took the quick start example, changed the dependencies and created a test step. This can be found at

https://github.com/thatstatsguy/ReqnRollReplication

In Rider I can see the following when running the test project

Image

If the packages aren't intended to work together, an interim step may be to enforce specific nuget versions and update the description to something other than

Package to use Reqnroll with xUnit 2.4 and later. Reqnroll is an open-source Cucumber-style BDD test automation framework for .NET. It has been created as a reboot of the SpecFlow project.

Link to Repro Project

https://github.com/thatstatsguy/ReqnRollReplication

thatstatsguy avatar Jan 17 '25 10:01 thatstatsguy

You are correct. Reqnroll.xUnit targets xUnit v2. Because of the incompatibility xUnit decided to release a new package xunit.v3 instead of bumping the current one.

As for Reqnroll.xUnit, we discussed this in some other issue (or maybe discord, I don't know) and likely the best solution would be to also make a Reqnroll.xUnit.v3 package that targets the new xUnit version. I don't think this will be too much work as we're only really touching the surface of xUnit.

ajeckmans avatar Jan 17 '25 11:01 ajeckmans

Note that this is not a versioning issue. When you're referencing xunit.v3 and Reqnroll.xUnit you're essentially referencing both the v2 (xunit package) and the v3 (xunit.v3 package) version of xUnit, which will definitely have conflicting type declarations.

ajeckmans avatar Jan 17 '25 11:01 ajeckmans

Hi!

First of all, thanks for all your work 😄

I've started using xunit.v3 and I faced the same issue. I was wondering about the times you usually work with to have an idea of when this would be available. In addition, where could I find (if you have it, of course) a roadmap of the upcoming changes?

Regards.

FerBenta avatar Jan 23 '25 11:01 FerBenta

As far as I see, there are breaking changes in xUnit 3 in the areas we use. So we cannot have a single plugin that works both with xUnit 2 and xUnit 3. So probably we should just make a copy of our own xUnit integration and change it for xUnit 3.

Anyone is interested to volunteer for this?

gasparnagy avatar Feb 07 '25 09:02 gasparnagy

Anyone is interested to volunteer for this?

I can give it a go

LoremFooBar avatar Feb 22 '25 18:02 LoremFooBar

I can give contribution as a volunteer

pritesh848 avatar Feb 24 '25 15:02 pritesh848

FYI I made a short list of what needs to be done to support xUnit 3.

https://github.com/orgs/reqnroll/discussions/363#discussioncomment-12311372

I hope this helps others:)

304NotModified avatar Feb 27 '25 19:02 304NotModified

@LoremFooBar https://github.com/xunit/xunit/discussions/3176#discussioncomment-12212809 here a link to a comment from Brad Wilson to some Information about v3.

DerAlbertCom avatar Mar 06 '25 19:03 DerAlbertCom

Released in v3.1.0 today (https://github.com/reqnroll/Reqnroll/releases/tag/v3.1.0)

gasparnagy avatar Sep 26 '25 13:09 gasparnagy

Amazing - thanks! Looking forward to using it.

thatstatsguy avatar Sep 29 '25 09:09 thatstatsguy