kiwigrid / gherkin-testcafe

Run testcafe tests with gherkin syntax
MIT License
69 stars 2 forks source link

Is there a way to skip a test? #48

Closed dthisner closed 5 years ago

dthisner commented 5 years ago

I can't seem to figure out how I can disable/skip test, with TestCafe you do: test.skip, how would that work with gherkin-testcafe?

eddiegroves commented 5 years ago

Add a tag to the scenario or feature to skip such as @skip and pass it through with --tags ~@skip.

The "~" is custom to gherkin-testcafe and will negate the tag, similar to not @skip in cucumberJS

@skip # <--- Skip all scenarios in the feature
Feature: The big search feature

  I want to find TestCafe repository by Google search

  @googleHook @skip <!-- or just skip this one
  Scenario: Searching for TestCafe by Google
    Given I open Google's search page
    When I am typing my search request "github TestCafe" on Google
    And I am pressing "enter" key on Google
    Then I should see that the first Google's result is "DevExpress/testcafe:"
Lukas-Kullmann commented 5 years ago

In addition to what @eddiegroves said, you can also use the command line options -t, -T, -f and -F to filter down tests by name.

dthisner commented 5 years ago

Thanks, was trying to avoid using tags, since sometimes I have developer using the tests and making sure they are using it correctly and disabling tests correctly (when needed). I will see if I can get some setup that makes it easy :)

Thanks a lot for the quick answers :)