Git Product home page Git Product logo

Comments (13)

princefishthrower avatar princefishthrower commented on June 10, 2024 1

I'm struggling as well for my tests to be found in an aspnetboilerplate test project. The only way I can get my methods to be found by the test runner is with the xUnit Fact decorator on each method, but this is actually undesired, because xUnit won't run the methods sequentially.

I'm on the latest xunit.runner.visualstudio (2.4.3)

Not sure what else is needed, I inherit from the Feature class, use the FeatureFile, Given, When, and Then` decorators...

from xunit.gherkin.quick.

alborozd avatar alborozd commented on June 10, 2024

the same problem

from xunit.gherkin.quick.

alborozd avatar alborozd commented on June 10, 2024

I updated xunit.runner.visualstudio dependency and it solved my problem. (from template I had version 2.3.1 in the project but the last version is 2.4.0 at the moment)

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

Wow, that's very good to know!
Thanks @alborozd

I think this can help others, too.

from xunit.gherkin.quick.

richard-haslam avatar richard-haslam commented on June 10, 2024

I have asked a question on stackover flow today and wonder if it is related to this issue?

https://stackoverflow.com/questions/52757138/how-to-get-xunit-to-find-dotnet-core-tests-on-linux-using-xunit-gherkin-quick

I'm pretty new to all of this.. so if it's not related at all.. just a bit desperate to find an answer this. (I have tried xunit.runner.visualstudio and it didn't help.

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

Did you try the suggestion by @alborozd above?

I updated xunit.runner.visualstudio dependency and it solved my problem. (from template I had version 2.3.1 in the project but the last version is 2.4.0 at the moment)

from xunit.gherkin.quick.

richard-haslam avatar richard-haslam commented on June 10, 2024

Thanks for the reply, yeah I have tried doing that and it doesn't seem to make any difference.

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

Got it. Needs to be investigated. I have not tried it myself yet. I'm using the framework from .NET Core only so far.

from xunit.gherkin.quick.

cathalmchale avatar cathalmchale commented on June 10, 2024

The Features text files are very particular about text encoding.
I had an issue where a new Feature file and corresponding test class would not be discovered and would not run (locally or on build box). But many existing features existed and run without issue.
I created new files with new names and cleaned up the text and simplified the Feature and test to absolute basics. Nothing worked, the test would not be discovered.

So I took a Feature file that I knew worked and copied it as a starting point. Then manually edited it so that it eventually looked like the one the didn't work. But this time the test could be discovered and run, without issue.

Looking at the two files (Working.feature and NotWorking.feature) in Notepadd++ with special chars highlighted or in BeyondCompare revealed nothing useful. However, I don't doubt that there was something abnormal about the encoding.

Summary
If you have a Feature file that refuses to be discovered by the test runner, but have other files that are being discovered fine, copy one of the good ones as a starting place and avoid copy-paste from PDFs etc.

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

@cathalmchale that's a good finding, thanks for posting it here!

Do you mind to open a new issue with that same info in it? That way each issue is for one particular topic and not several - easier for the other readers when they browse through the issue topics.

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

I just tried and this issue indeed happens. I don't see tests discovered for the normal (full) .net framework. I guess Xunit behaves differently for .net framework as opposed to .net core.

Does anybody have any new findings around this issue?

from xunit.gherkin.quick.

ttutisani avatar ttutisani commented on June 10, 2024

Following up with Xunit authors about this: xunit/xunit#1993

I am suspecting it has something to do with Xunit, but not sure yet.

from xunit.gherkin.quick.

minhhieugma avatar minhhieugma commented on June 10, 2024

still facing the same until now. So, in short, this library doesn't support .NET Framework. That's it

from xunit.gherkin.quick.

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.