cucumber / cucumber/godog

build tags?

Open
#154 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.7k
Forks
280
Avg merge
2d 20h
Merged PRs (30d)
2

Description

I separate different kinds of tests using build tags, eg:

```go
// +build functional

package main

import (
"fmt"
"github.com/DATA-DOG/godog"
)
...
func FeatureContext(s *godog.Suite) {
s.Step(`^there are (\d+) godogs$`, thereAreGodogs)
s.Step(`^I eat (\d+)$`, iEat)
s.Step(`^there should be (\d+) remaining$`, thereShouldBeRemaining)

s.BeforeScenario(func(interface{}) {
Godogs = 0 // clean the state before every scenario
})
}
...
```

when I run godog without args, it cannot find the context initializer. Is there any way to make this work with godog?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported behavior using the functional build-tag example and a no-argument godog run. Start by tracing how godog locates the context initializer; done means establishing whether this build-tagged setup works, or clearly documenting the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.