You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I separate different kinds of tests using build tags, eg:
// +build functionalpackage main
import (
"fmt""github.com/DATA-DOG/godog"
)
...funcFeatureContext(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?
Reacted by Adam Mullin, Mateusz Czapliński, Wichert Akkerman and Dima Kotik
Activity
l3pp4rd commentedon Jan 16, 2019
Hi, yes at the moment
godogcommand line tool does not accept build tags. For now you can run it in TestMain function usinggo test -tags tag.I'll need to think about such an option for godog command for relaying build tags or in general build arguments.