Comments (13)
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.
the same problem
from xunit.gherkin.quick.
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.
Wow, that's very good to know!
Thanks @alborozd
I think this can help others, too.
from xunit.gherkin.quick.
I have asked a question on stackover flow today and wonder if it is related to this issue?
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.
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.
Thanks for the reply, yeah I have tried doing that and it doesn't seem to make any difference.
from xunit.gherkin.quick.
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.
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.
@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.
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.
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.
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)
- Fail to discover feature file if tab character is in between "And" keyword and step definition HOT 1
- Has anyone got it work in a Unity3d project? - HelpWanted HOT 14
- Pass string as list HOT 3
- Enable cucumber expressions HOT 14
- Code generator to convert Gherkin file into C# test code?
- Cannot install Xunit.Gherkin.Quick due to circular reference HOT 1
- Double are converted to integers HOT 4
- Running Feature files without compilation HOT 4
- Feature discoverable by pattern parent folder issue HOT 15
- Scenario name in spec constructor HOT 2
- Can we have an @retry attribute? HOT 8
- Exception during discovery
- Feature files not discovered by test explorer in Visual Studio v. 17.6.2 HOT 3
- Visual Studio Test Explorer unable to discover Cucumber tests. HOT 1
- 'And' step keyword add to more constraint HOT 4
- Scenario outlines don't push values into DocString objects HOT 7
- DataTable and DocString in Scenario Outline - don't inject examples by default
- Scenario Outlines parser consider less operator ("<") as a starting char of an Example and searches for a wrong instance in the table. HOT 12
- Let ignoring scenarios using multiple @ignore tags. HOT 5
- Tests aren't visible in test explorer in visual studio code HOT 3
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 xunit.gherkin.quick.