-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCover tool only intercepts the last test assembly #688
Comments
This should remain open since this still applies to xUnit. |
Ah, gotcha. Should we make that a separate issue? Or will we be able to correct that before we ship 0.9.0? |
@gep13 Hmmm. You've got a point. What do you think is best? |
@patriksvensson I would be happy to leave it open, and complete the XUnit work under this same issue, but at the same time, I wouldn't want to hold up the release because it wasn't in. Is there a lot of work to correct the XUnit side of things? |
@gep13 No, not much to do. I can fix it tonight to get it out of the way 😄 |
@patriksvensson that sounds perfect 👍 |
DotCover #691 also suffers from this issue since it works the same way as OpenCover. |
@mholo65 This should be fixed in v0.10 for dotCover as well 😄 |
Should this be reopened due to #745? |
@phrusher xUnit 1 do not seem to support multiple assemblies so not sure what can be done here. |
@phrusher xunit 2 still supports multiple assemblies, was only the old XUnit V1 aliases that were reverted |
@patriksvensson exactly, as XUnit2 is backwards compatible it should suffice. |
@patriksvensson @devlead Just wanted to check as it related to this issue. We are running XUnit1 but I guess it might be difficult to fix this issue completely. |
@phrusher You can use the xUnit v2 tool to run xUnit v1 assemblies 😄 |
@patriksvensson yeah that would work, could be an issue if tests depend on xunit pre 1.9.2 it could potentially be some breaking changes, but worth a shot ;) |
@patriksvensson Well I'll be damn.. It worked! :) Thanks! |
I copy your code, running is fail! |
@AnimationChen What code? The code at the top represents the original issue posted 3,5 years ago and will not work. |
Internally OpenCover intercepts the test alias and runs it. The problem however is that the test alias only executes once, for the last test-dll even if there are multiple assemblies found by the globber.
So when running a test runner separately all matching test assemblies are processed...
But when running the same test runner within OpenCover, the same test assemblies are found but only the last one is intercepted and processed.
The same behavior is observed both with MSTest and XUnit. Perhaps because both of them iterates over the collection and executes the test assemblies one by one?
The text was updated successfully, but these errors were encountered: