Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests aren't visible in test explorer in visual studio code #153

Open
MPSwift opened this issue May 2, 2024 · 3 comments
Open

Tests aren't visible in test explorer in visual studio code #153

MPSwift opened this issue May 2, 2024 · 3 comments

Comments

@MPSwift
Copy link

MPSwift commented May 2, 2024

Hi,
I'm using Visual Studio Code, .NET v8 and the latest version of this framework (v.4.5) but I can't make it to show the tests in the test explorer.
I can see all the other xUnit test cases (see below structur "MyOtherUnitTestCases") but not the cucumber tests ("MyApiTestCases").

I write the cs file with the step definition where given, when, then contains simply a log "not yet implemented" and I have the feature file.
My expectation is to see the tests in the test explorere and if I run them to get the log prints "not yet implemented".

The structur is like:
MyProject
--MyApiTestCases
----MyTest.feature
----MySteps.cs
--MyOtherUnitTestCases
----MyUnitTestA
----MyUnitTestB

What am I missing? Should feature file and cs file have the same name?

@ttutisani
Copy link
Owner

Yes, the feature file and cs file are linked using the [FeatureFile] attribute.

If this does not resolve the issue, since there are multiple steps to properly configuring the tests, I suggest that you follow the Getting Started tutorial (on the home page). Once that works, modify to tailor to your needs.

@MPSwift
Copy link
Author

MPSwift commented May 2, 2024

Hm, the [FeatureFile] attribute exist and I followed the getting started but the tests are still not visible in the test explorer in VS Code.
I tried with coping the Calculator.cs, the AddTwoNumbers.cs and AddTwoNumbers.feature but they are also not visible in the test explorer.

@ttutisani
Copy link
Owner

So the ProjectConsumer tests are not showing out of the box? Okay, that must be something else, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants