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

Skipping a test by returning godog.ErrSkip does not work? #589

Open
juliangp opened this issue Dec 7, 2023 · 4 comments
Open

Skipping a test by returning godog.ErrSkip does not work? #589

juliangp opened this issue Dec 7, 2023 · 4 comments

Comments

@juliangp
Copy link

juliangp commented Dec 7, 2023

πŸ‘“ What did you see?

When skipping a test by returning godog.ErrSkip the test is marked as failed and not as skipped.

This is what we get when running the test:

image

βœ… What did you expect to see?

We expected to see the first test to pass and the second step to skip?

πŸ“¦ Which tool/library version are you using?

This is using github.com/cucumber/godog v0.13.0.

πŸ”¬ How could we reproduce it?

Steps to reproduce the behavior:

  1. Install '...' version '...'
  2. Create a file called '....'
  3. Run command '....'
  4. See error '....'

This is the example that I am running?

skip.zip

πŸ“š Any additional context?

Please let me know if you need more information?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@vearutop
Copy link
Member

vearutop commented Dec 7, 2023

I've extracted skip.zip to a directory, created a module there, ran go mod tidy to fetch external deps.
Then

go install github.com/cucumber/godog/cmd/godog@latest
godog --version
Godog version is: v0.13.0

then

godog
Use of godog CLI is deprecated, please use *testing.T instead.
See https://github.com/cucumber/godog/discussions/478 for details.
Use of godog CLI is deprecated, please use *testing.T instead.
See https://github.com/cucumber/godog/discussions/478 for details.
Feature: Test skip error
  User should be able to skip a test.

  Scenario Outline: should skip the tests correctly # features/test_skip.feature:4
    When the test should be "<state>"               # <autogenerated>:1 -> *testContext

    Examples:
      | state |
      | ok    |
      | skip  |
      | ok    |

3 scenarios (3 passed)
3 steps (2 passed, 1 skipped)
390.903Β΅s

Can not reproduce, could it be that your godog runner is an older version?

@juliangp
Copy link
Author

@vearutop thanks for looking at this, I am looking to see what is different in our case but it maybe that we are running our tests in parallel.

@juliangp
Copy link
Author

@vearutop I am a bit puzzled here - I did what you said, here is my zip with the go.mod skip.zip but it fails when I run like this?

Screenshot 2023-12-14 at 17 28 40

@juliangp
Copy link
Author

@vearutop running go test also fails:

Screenshot 2023-12-14 at 17 42 22

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