Comments (20)
Any news of when this will be fixed?
from resharper-xunit.
Ah, I thought I'd left more context here than just the bare description. This requires the rewrite of the in-editor test discovery, which is not going to be an overnight thing, and which I haven't yet started
(The gory details: the runner is currently doing test discovery and comparing class and method names to decide what to run. If a method isn't listed, but is discovered, it might be because you don't want to run it, or it might be due to an xunit1 RunWith
attribute. The runner doesn't have enough context to know, so it errs on the side of caution and runs it. This means we run all methods in a class, even if they're not required. When rewriting the in-editor discovery, xunit will find each class and method, and give me an object that I can serialise to the runner so that the runner doesn't have to do discovery any more. This should improve speed and accuracy of what's run. At least, that's the plan)
On the bright side, I'll be starting it this week 😄
from resharper-xunit.
Well, I hope to see this being fixed soon. It's quite a "pain in the...." right now, not being able to run a specific test for e.g. debugging.
from resharper-xunit.
I would love to see this fixed as well.
from resharper-xunit.
from resharper-xunit.
@damianh +1
from resharper-xunit.
Actually one of the reasons keeping me from upgrading to v2
from resharper-xunit.
+1
from resharper-xunit.
+10! :) I guess I'll have to roll back to V1.9.2 :(
from resharper-xunit.
It seems this bug related to v2, but I'm getting this behaviour with v1.9.2 in R# 9.0 - is this expected?
I'm also seeing the Unit Test Sessions window refreshing on every keypress inside a test class, which results in a lot of lag when trying to type (I have to close it).
I'm at the point of rolling back to R# 8.2 or using the VS runner.
from resharper-xunit.
Yes, it also affects xunit 1.x in R#9, as the R#9 codebase is using the new xunit2, although I didn't see it happen when I tested before release.
I haven't seen the refreshing on each keypress. The test sessions window updates quickly if I start adding a new method, and the code won't compile - the tests defined after the start of the new method declaration disappear, and are then re-added. Is this what you're seeing?
from resharper-xunit.
@citizenmatt I'd be happy to invest some time in fixing this. xunit2 has provided some major benefits for us but being unable to debug a single unit test is a bit of a drawback.
Your comment on June 10th made it sounds like there was quite a bit of work involved.
If you give me some pointers on what direction you intend to take things I can look at this.
from resharper-xunit.
@citizenmatt Thanks for confirming. Re refresh, that's more-or-less it. Rather typically, I can't quite reproduce the behaviour that was infuriating me earlier today.
In addition to what you've described, even with all collapsed I'm seeing some re-ordering before settling back where they were. I can't really see what or how, I'd need to video it and slow it down!
from resharper-xunit.
@csmager I see similar redraws when working with nunit - would be great if you can confirm, and I'll take it to the dev team as a ReSharper issue, rather than an issue in this plugin.
from resharper-xunit.
@smalldave the xunit2-discovery branch shows the work in progress (ReSharper 8, doesn't contain 9.0 stuff yet). It's migrating the assembly metadata explorer from using the xunit1 based reflection abstractions and utility methods to firing up a new AppDomain to run the xunit2 discoverer from the users bin folder using the xunit2 reflection abstractions. Last time I ran it, there were issues with remoting (ensuring IEnumerable
wasn't passed through as a linq query but a collection, etc). The same needs to be done with the source explorer.
The tricky bits (once this is working
- Making sure the AppDomain is shadow copied so we don't lock the user's copy of xunit
- Recreating the AppDomain when the user's copy of xunit changes
- Working when the user hasn't yet built and there is no xunit assembly in the bin folder
I'm also thinking there's a way to workaround this specific issue by smuggling data from the current xunit1 provider to the new xunit2 runner, telling the runner what the provider already knows (i.e. the provider says - I'm a test class, I know all these methods, now just run this one. Currently, the provider says, run this method, and the runner looks and says, I found all these other methods, they might be dynamically discovered, I've got no way of knowing, I'd better run them. Yes, my code has conversations).
from resharper-xunit.
@citizenmatt The lagging issue seems to occur when I have the Unit Test Sessions tab open on my second monitor. When you change the name of a test method or create a new one in visual studio you start seeing the lag as the sessions tab is constantly refreshing.
from resharper-xunit.
@citizenmatt can I get the 1.9.2 version for R#9, the single runnning bug is really annoying? Or how to manually install?
from resharper-xunit.
How is this manifesting in ReSharper 9? It seems to only run a single method (it's not, but I can't see anything).
from resharper-xunit.
OK, I've got a workaround for this, more or less. It seems to work, except for theories in xunit1 - if you try to run just one theory, it will run all in the test method. It works ok for xunit2. I just don't have enough information to filter this out - not sure if this will just be a limitation of xunit1, even when the discovery is properly rewritten.
The other thing is that I don't have time to package it up right now - I'll push a new version as soon as I get a chance.
from resharper-xunit.
The fixed version is available on the gallery, for ReSharper 8 and 9.
from resharper-xunit.
Related Issues (20)
- 2.3.3 showing diagnostic Errors popup where 9 wasn't, how to disable? HOT 5
- How to debug a specific set of data of a theory? HOT 2
- Add support for R# 10.1 (EAP / Wave 5.0) HOT 26
- Difference in count of available tests HOT 6
- Cannot install v2.3.4 for Resharper 1.0.2 HOT 7
- Plugin not finding test assembly HOT 1
- Running a test marked as [Fact] runs tests in the same class marked with [Theory] HOT 1
- when test methods are in base class, traits on a child class, they show as <Uncategorized> HOT 1
- Running Nancy tests fails with ArgumentException HOT 2
- dotCover 10.0.2 shows empty coverage when running tests using this extension HOT 1
- Using dnx version > to 451 makes Unit test disappears from test explorer HOT 1
- Unable to run tests for Universal Class Library HOT 7
- Missing test runner context icon from gutter HOT 8
- Not working for .NET Core HOT 1
- Cannot use Resharper Test Session HOT 1
- Debug test randomly identifies the test as skip despite no xunit skip
- After 2016.2 Update, discovering xUnit Theory tests causes White Screen when selecting large blocks that need to be discovered HOT 1
- XUnit 2.1 Custom CategoryTraitAttribute is ignored in Unit Test Explorer - Group by HOT 2
- Resharper 2017.2 Can't support VS2015
- Theory test runs only once HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resharper-xunit.