Giter Club home page Giter Club logo

Comments (20)

danielwertheim avatar danielwertheim commented on August 16, 2024

Any news of when this will be fixed?

from resharper-xunit.

citizenmatt avatar citizenmatt commented on August 16, 2024

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.

danielwertheim avatar danielwertheim commented on August 16, 2024

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.

moozzyk avatar moozzyk commented on August 16, 2024

I would love to see this fixed as well.

from resharper-xunit.

damianh avatar damianh commented on August 16, 2024

👍 Slowly driving me bonkers. Debugging a specific test particularly painful.

from resharper-xunit.

razonrus avatar razonrus commented on August 16, 2024

@damianh +1

from resharper-xunit.

danielwertheim avatar danielwertheim commented on August 16, 2024

Actually one of the reasons keeping me from upgrading to v2

from resharper-xunit.

smalldave avatar smalldave commented on August 16, 2024

+1

from resharper-xunit.

kabua avatar kabua commented on August 16, 2024

+10! :) I guess I'll have to roll back to V1.9.2 :(

from resharper-xunit.

csmager avatar csmager commented on August 16, 2024

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.

citizenmatt avatar citizenmatt commented on August 16, 2024

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.

smalldave avatar smalldave commented on August 16, 2024

@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.

csmager avatar csmager commented on August 16, 2024

@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.

citizenmatt avatar citizenmatt commented on August 16, 2024

@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.

citizenmatt avatar citizenmatt commented on August 16, 2024

@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 😄 ) are:

  • 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.

SingleCopy avatar SingleCopy commented on August 16, 2024

@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.

jaceenet avatar jaceenet commented on August 16, 2024

@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.

citizenmatt avatar citizenmatt commented on August 16, 2024

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.

citizenmatt avatar citizenmatt commented on August 16, 2024

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.

citizenmatt avatar citizenmatt commented on August 16, 2024

The fixed version is available on the gallery, for ReSharper 8 and 9.

from resharper-xunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.