Skip to content

Running as subtest does not respect Strict optionΒ #536

@davidedmondsMPG

Description

@davidedmondsMPG

πŸ‘“ What did you see?

Running a suite with steps that return godog.ErrPending in subtest mode fails the test regardless of the Strict option.

βœ… What did you expect to see?

Running a suite with steps that return godog.ErrPending in subtest mode:

  • fails the test if the Strict option is set to true
  • does not fail the test (maybe skips with t.Skip()) if the Strict option is set to false

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

Godog v0.12.6
Golang v1.19.4 darwin/amd64

πŸ”¬ How could we reproduce it?

  1. Create a simple feature with at least one step
  2. Create a subtest mode test to run the feature, setting the Strict option to false
  3. Run the test to get the generated stubs
  4. Copy-paste the output into the appropriate places in the test file
  5. Run the test again - the subtest is marked as failed.

πŸ“š Any additional context?

If the TestingT parameter is removed then the Strict flag behaves as I'd expect.

Raising as an issue as I'm not 100% sure if this behaviour's intentional. If accepted, am happy to contribute a fix.


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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions