ttutisani / Xunit.Gherkin.Quick

BDD in .NET Core - using Xunit and Gherkin (compatible with both .NET Core and .NET)
MIT License
205 stars 29 forks source link

ignoring or skipping a test #48

Closed SDETRK closed 6 years ago

SDETRK commented 6 years ago

Hi, In specflow we can use the tag '@ignore' to skip a test. The use case for it, for example, if the test is failing for a known bug and you want to skip running it until the bug is closed. Are you going to support it?

ttutisani commented 6 years ago

Makes sense. Will be the first one to pick up and work on. ETA within my availability: couple of weeks. Max in a month it will be out. Thanks for submitting the issue!

SDETRK commented 6 years ago

great thank you!

ttutisani commented 6 years ago

I have couple of questions about this, just to make up my mind:

Do you think the scenario should still be discovered and shown in the output? Or do you think that ignored scenario should behave like non-existing scenario? Please clarify.

I personally think the scenario should be discovered, and in the output the result should say "skipped", but I may change my mind if otherwise makes more sense.

SDETRK commented 6 years ago

The scenario should still be discovered, it exists but it shouldn't be executed

csurfleet commented 6 years ago

I agree - they should discover but show as ignored if possible

ttutisani commented 6 years ago

Good. Thanks you all for the input! It seems it's absolutely doable, since Xunit has a way to skip the test with the reason. I'm targeting to use that capability. Scenario will show up with yellow triangle in the test runner GUI. And in the output stream it will simply display a skip reason next to the scenario name.

Work is in progress: https://github.com/ttutisani/Xunit.Gherkin.Quick/compare/tagsImprovements?expand=1

I need to cleanup slightly how we handle tags in general, and then I will be able to add the capability to ignore the scenario based on the @ignore tag.

ttutisani commented 6 years ago

FYI - code changes are complete and merged. I will write up some instructions and then will release. That will be either tomorrow or next week.

ttutisani commented 6 years ago

Nuget version 3.1.0 is out now. That is for @ignore tag support. If you face any issues, please let me know.

SDETRK commented 6 years ago

ok great, thank you!

ttutisani commented 6 years ago

Closing this issue. If any problems found, please open a new github issue.