AxoCover icon indicating copy to clipboard operation
AxoCover copied to clipboard

Support for xUnit 2.3

Open brutaldev opened this issue 8 years ago • 35 comments

Please add support for xUnit 2.3

brutaldev avatar Oct 16 '17 21:10 brutaldev

What's now not working with xUnit 2.3? What needs to be done?

304NotModified avatar Nov 02 '17 13:11 304NotModified

Tests are not discovered in the AxoCover Visual Studio tests pane for projects that reference xUnit 2.3. The plugin/extension seems quite adamant that it only supports xUnit 2.2 although I'm not certain why that is.

brutaldev avatar Nov 02 '17 14:11 brutaldev

I guess strong naming issues

304NotModified avatar Nov 02 '17 14:11 304NotModified

any ETA for this feature? @axodox BTW, thanks for this great tool!

jotatoledo avatar Nov 17 '17 09:11 jotatoledo

AxoCover was originally made for MSTEST for my personal use. Xunit was requested by community, but it to work properly, I needed to fork its runner and add a small change. This same change was requested by others before me multiple times in fact and was always rejected. So I need to keep the fork alive.

The other issue is that Xunit runner and library is only working if they are the same version, unlike nunit and mstest, which works even with different combinations quite well.

Updating the fork to Xunit 2.3 is not much work for me, if I break the 2.2 compatibility. To keep both 2.2 and 2.3 however, I need to have 2 forks for the 2 versions and possibly even more later. And for this I need to design a solution which can support this versioning. Or look for other possible solutions.

I don't have much free time either. So if you are willing to help I can point you what needs to be done.

axodox avatar Nov 17 '17 10:11 axodox

The other issue is that Xunit runner and library is only working if they are the same version, unlike nunit and mstest, which works even with different combinations quite well.

Is this because of strong naming?

I don't have much free time either. So if you are willing to help I can point you what needs to be done.

Where is the fork located?

304NotModified avatar Nov 17 '17 16:11 304NotModified

Updating the fork to Xunit 2.3 is not much work for me, if I break the 2.2 compatibility. To keep both 2.2 and 2.3 however, I need to have 2 forks for the 2 versions and possibly even more later. And for this I need to design a solution which can support this versioning. Or look for other possible solutions.

I think it's OK to support only the latest version for now. Especially if we could install older versions of AxoCover

304NotModified avatar Nov 17 '17 16:11 304NotModified

No, it is because the internal changes between minor versions are substantial, e.g. dll name changes, namespace, class renames, interface incompatibility etc. AxoCover uses the runner for visual studio internally, the break is between the different versions of the runner vs. the lib. this also causes the tests sometime to not show up in VS either, e.g. when you don't update the runner etc.

Fork is at: https://github.com/axodox/visualstudio.xunit

axodox avatar Nov 17 '17 17:11 axodox

The changes are on the AxoCover branch, you will need to pull the new code from the actual xunit remote (so need to add a remote in git), then you merge the changes, build. After that a nuget package is created and AxoCover is updated to it. Then it will support 2.3, but not 2.2 anymore. (Which I am OK with too, since I don't actually use xunit, as our shop is mstest only.)

axodox avatar Nov 17 '17 17:11 axodox

xUnit 2.2.0 breaks some of the tests on my project. 2.3.1 works great. Can you tell me what I need to change in AxoCover to support 2.3.1 on my machine? Thanks!

Siderite avatar Jun 06 '18 16:06 Siderite

You need to update the fork: https://github.com/axodox/visualstudio.xunit to xUnit 2.3.1 then build AxoCover with it.

axodox avatar Jun 07 '18 09:06 axodox

Did anyone had success using axocover with xUnit 2.3.?

@axodox Could you please elaborate? I'm not entirely sure how to proceed.

Panzki avatar Sep 11 '18 11:09 Panzki

@axodox it may be better to close this issue as a "won't fix", with a clear statement on your position, which as I understand it, is:

AxoCover supports xunit only up to version 2.2. There are no plans to support later versions of xunit. If you would like to add support for later versions of xunit, please fork the project.

adamralph avatar Sep 11 '18 12:09 adamralph

@adamralph It is not there are no plans or similar, but I have put the project on the parking lane for a while now, as it consumed too much of my free time for years. Another reason is that most of the development I do right now at work either web based or in C++, and the .Net part uses MSTest V1. I understand your frustration. If someone updates AxoCover support, I will integrate it.

axodox avatar Sep 11 '18 12:09 axodox

@Panzki You should compare the AxoCover and master branches of the mentioned VS xunit plug-in fork. Those changes need to be migrated to the version of XUnit you need. Then we can package it with AxoCover for the updated support. It should be doable in less than a day.

axodox avatar Sep 11 '18 12:09 axodox

@Panzki https://github.com/axodox/visualstudio.xunit is used to generate a nuget package, which is used inside AxoCover. So if you have migrated to the latest version, simply generate the nuget package and put into AxoCover dependencies (or for testing just copy the DLLs). Theoretically this should suffice, if there is a difference in the file list, you might need to check the code in AxoCover providing Xunit support: https://github.com/axodox/AxoCover/tree/master/AxoCover/Models/Testing/Adapters

axodox avatar Sep 11 '18 12:09 axodox

...I have put the project on the parking lane for a while now, as it consumed too much of my free time for years. Another reason is that most of the development I do right now at work either web based or in C++...

Perhaps it's time to hand over the reins to someone else?

adamralph avatar Sep 11 '18 12:09 adamralph

I am open to that too, if there is someone willing to take over the work.

axodox avatar Sep 11 '18 12:09 axodox

@axodox I took the liberty of raising a PR over at maintainers-wanted.

adamralph avatar Sep 11 '18 13:09 adamralph

@adamralph does it work with xunit 2.4?

raytangRT avatar Sep 12 '18 01:09 raytangRT

@raytangRT I'm the wrong person to ask, since I've never even used AxoCover. I'm only following this issue because of this: https://github.com/xbehave/xbehave.net/issues/434#issuecomment-386868043

However, to my knowledge, AxoCover only supports xunit 2.2.

adamralph avatar Sep 12 '18 07:09 adamralph

@adamralph sorry, I did not read the PR properly, I thought you are the one who did a PR on this project and make it support 2.3

raytangRT avatar Sep 12 '18 07:09 raytangRT

Support for xUnit 2.4. would be awesome. I can work on it.

VinS101 avatar Oct 02 '18 18:10 VinS101

@VinS101 Please do 👍

304NotModified avatar Oct 02 '18 20:10 304NotModified

@VinS101 any chance you got anywhere with this?

jsabrooke avatar Jan 10 '19 13:01 jsabrooke

@jsabrooke Haven't started any work yet. It's in my backlog.

VinS101 avatar Jan 10 '19 15:01 VinS101

I'm not sure what happened, but axoCovered started working for me. I have xUnit 2.4.

VinS101 avatar Feb 19 '19 15:02 VinS101

I'm not sure what happened, but axoCovered started working for me. I have xUnit 2.4.

I have just upgraded to xUnit 2.4 but still no tests found, did you do anything else to your project before upgrading?

malcolmarobertson avatar Feb 21 '19 11:02 malcolmarobertson

@malcolmarobertson The only thing I can think of: I updated my VS2017 to version 15.9.6 a couple weeks ago.

These are my axoCover settings: image

VinS101 avatar Feb 21 '19 19:02 VinS101

hey @VinS101 . Unfortunately just tried upgrading VS2017 to 15.9.7, but still the tests are not recognized. I am using xUnit 2.4.1 .. Did anyone else manage to get this working?

biancarus88 avatar Feb 22 '19 14:02 biancarus88