🧪 test: add GODOG_STOP_ON_FAILURE environment variable support

- Add GODOG_STOP_ON_FAILURE environment variable to all test suites
- Maintain feature-specific defaults for stop on failure behavior
- JWT, Greet, Auth, Health: stop on failure by default (true)
- Config, All Features: continue after failures by default (false)
- Allow runtime override via environment variable
- Update BDD_TAGS.md with usage examples and defaults
- Support boolean values: true, false, 1, 0

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistralai.com>
This commit is contained in:
2026-04-10 10:17:43 +02:00
parent 1f92302eff
commit 756fc5abfd
7 changed files with 62 additions and 7 deletions

View File

@@ -20,6 +20,12 @@ func TestJWTBDD(t *testing.T) {
tags = "~@flaky && ~@todo && ~@skip"
}
// Allow stop on failure override via environment variable
stopOnFailure := true // Default for JWT tests
if envStop := os.Getenv("GODOG_STOP_ON_FAILURE"); envStop != "" {
stopOnFailure = envStop == "true" || envStop == "1"
}
suite := godog.TestSuite{
Name: "dance-lessons-coach BDD Tests - JWT Feature",
TestSuiteInitializer: bdd.InitializeTestSuite,
@@ -30,7 +36,7 @@ func TestJWTBDD(t *testing.T) {
TestingT: t,
Strict: true,
Randomize: -1,
StopOnFailure: false,
StopOnFailure: stopOnFailure,
Tags: tags,
},
}