Coder Social home page Coder Social logo

Explicitness of tests is ignored in the presence of a filter with adding multiple negated categories about nunit-v2-framework-driver HOT 10 CLOSED

aeyaey avatar aeyaey commented on July 1, 2024
Explicitness of tests is ignored in the presence of a filter with adding multiple negated categories

from nunit-v2-framework-driver.

Comments (10)

CharliePoole avatar CharliePoole commented on July 1, 2024

It's not surprising that this bug is present because we had to fix it in NUnit 3, so it was probably present in NUnit V2. The V2 framework driver actually uses the NUnit V2 assemblies so it would naturally have the same problem.

Workaround might be to use --where "!(cat == Db || cat == UnitTest)". No guarantees there, however.

Two ways to fix this if we want to...

  1. The adapter could theoretically detect the filter structure (e.g. two negations under an "and") and create a new, equivalent structure that works. Pretty hacky, but necessary if the V2 assemblies are not changed.

  2. Modify the V2 assemblies, perhaps including their source in the driver itself. I'm interested in exploring this idea.

What do other @nunit/framework-team members think?

from nunit-v2-framework-driver.

jnm2 avatar jnm2 commented on July 1, 2024

If someone is willing to contribute a fix, I'd prefer the fix to be in the correct place (2).

from nunit-v2-framework-driver.

aeyaey avatar aeyaey commented on July 1, 2024

The workaround @CharliePoole proposes seems to work. Thanks a lot.

I'm not totally sure what you mean with V2 assemblies. But when excluding multiple categories in Nunit 2.6.4, we use the /exclude command line option:
/exclude:"Db,UnitTest", and that worked fine too.

from nunit-v2-framework-driver.

CharliePoole avatar CharliePoole commented on July 1, 2024

Sorry to confuse... What I'm saying is this...

The filter code in V3 comes from V2. It had an error we had to fix, but of course, it was never fixed in the original (V2) code. The error is not triggered by use of the /Exclude parameter because it actually produces the filter structure I suggested as a workaround... !(a or b) rather than !a and !b. In fact, in V2 it's very hard to produce the bug, because there is no syntax to trigger it. However it's present in the underlying filter.

from nunit-v2-framework-driver.

mikkelbu avatar mikkelbu commented on July 1, 2024

I actually could live with option (1), since I don't think that many people are going to need this, and I think that "including their source in the driver itself" sounds complicated for such an issue (@CharliePoole do you have any idea of how large/difficult the fix is, if we go for solution (2)?)

from nunit-v2-framework-driver.

CharliePoole avatar CharliePoole commented on July 1, 2024

@mikkelbu For (1) I said "theoretically" meaning "I have no idea how to do it." 😃

For (2) my working assumption is that we can port changes we made to the same code in NUnit 3 back to NUnit 2, but I haven't checked on that. I do know that the NUnit 3 filter code started out the same as the V2 code and that it now works correctly.

from nunit-v2-framework-driver.

CharliePoole avatar CharliePoole commented on July 1, 2024

@ChrisMaddock Re: pre-release review

I think this may just have been fixed in V3. Perhaps the fix could be ported to V2. If so, then it's a problem for NUnitV2, not for this extension. One of us should review.

from nunit-v2-framework-driver.

ChrisMaddock avatar ChrisMaddock commented on July 1, 2024

@CharliePoole This isn't something I'm able to pick up personally, I'm afraid. Given it's a 2 year old issue, I'd say it should be left out of this release, and left for any "future willing maintainer" ;-)

from nunit-v2-framework-driver.

CharliePoole avatar CharliePoole commented on July 1, 2024

This needs to be re-confirmed because of changes in the underlying code base over time.

from nunit-v2-framework-driver.

CharliePoole avatar CharliePoole commented on July 1, 2024

🎉 This issue has been resolved in version 3.9.0 🎉

The release is available on:

from nunit-v2-framework-driver.

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.