diff --git a/features/BDD_TAGS.md b/features/BDD_TAGS.md index 2ecdb17..8b75c15 100644 --- a/features/BDD_TAGS.md +++ b/features/BDD_TAGS.md @@ -32,6 +32,21 @@ Used to exclude tests from execution: - `@todo` - Tests with pending step implementations - `@skip` - Tests that should be skipped entirely +### Work In Progress Tag +Used to override exclusions for active development: +- `@wip` - Work In Progress - overrides exclusion tags to allow focused development + +**Usage:** Add `@wip` to scenarios you're actively working on, even if they have other exclusion tags like `@todo` or `@skip`. The `@wip` tag takes precedence and allows the scenario to run. + +**Example:** +```gherkin +@todo @wip +Scenario: JWT authentication with multiple secrets + Given the server is running with multiple JWT secrets + When I authenticate with valid credentials + Then I should receive a valid JWT token +``` + ## Usage Examples ### Running Smoke Tests @@ -159,6 +174,7 @@ Feature: Health Endpoint | `@flaky` | Exclude flaky tests | `@flaky` on unstable scenarios | | `@todo` | Exclude pending tests | `@todo` on unimplemented scenarios | | `@skip` | Exclude tests entirely | `@skip` on disabled scenarios | +| `@wip` | Work in progress | `@wip` on actively developed scenarios | ## Future Enhancements diff --git a/features/auth/auth_test.go b/features/auth/auth_test.go index b4e4c50..b2b28e6 100644 --- a/features/auth/auth_test.go +++ b/features/auth/auth_test.go @@ -24,7 +24,7 @@ func TestAuthBDD(t *testing.T) { Strict: true, Randomize: -1, StopOnFailure: true, - Tags: "~@flaky && ~@todo && ~@skip", + Tags: "~@flaky && ~@todo && ~@skip && @wip", }, } diff --git a/features/config/config_test.go b/features/config/config_test.go index 52f4283..0e4eaaa 100644 --- a/features/config/config_test.go +++ b/features/config/config_test.go @@ -24,7 +24,7 @@ func TestConfigBDD(t *testing.T) { Strict: true, Randomize: -1, StopOnFailure: false, - Tags: "~@flaky && ~@todo && ~@skip", + Tags: "~@flaky && ~@todo && ~@skip && @wip", }, } diff --git a/features/greet/greet_test.go b/features/greet/greet_test.go index 9823827..0be53e9 100644 --- a/features/greet/greet_test.go +++ b/features/greet/greet_test.go @@ -24,7 +24,7 @@ func TestGreetBDD(t *testing.T) { Strict: true, Randomize: -1, StopOnFailure: true, - Tags: "~@flaky && ~@todo && ~@skip", + Tags: "~@flaky && ~@todo && ~@skip && @wip", }, } diff --git a/features/health/health_test.go b/features/health/health_test.go index 0d1400e..6ca35d5 100644 --- a/features/health/health_test.go +++ b/features/health/health_test.go @@ -24,7 +24,7 @@ func TestHealthBDD(t *testing.T) { Strict: true, Randomize: -1, StopOnFailure: true, - Tags: "~@flaky && ~@todo && ~@skip", + Tags: "~@flaky && ~@todo && ~@skip && @wip", }, } diff --git a/features/jwt/jwt_test.go b/features/jwt/jwt_test.go index 32d0c1b..25a0038 100644 --- a/features/jwt/jwt_test.go +++ b/features/jwt/jwt_test.go @@ -24,7 +24,7 @@ func TestJWTBDD(t *testing.T) { Strict: true, Randomize: -1, StopOnFailure: true, - Tags: "~@flaky && ~@todo && ~@skip", + Tags: "~@flaky && ~@todo && ~@skip && @wip", }, } diff --git a/scripts/run-bdd-tests.sh b/scripts/run-bdd-tests.sh index 09b4c54..65ba3c7 100755 --- a/scripts/run-bdd-tests.sh +++ b/scripts/run-bdd-tests.sh @@ -126,13 +126,13 @@ run_tests_with_tags() { set +e if [ -n "$tags" ]; then - # Use godog directly for tag filtering with exclusion - echo "🚀 Running: godog $tags --tags=~@flaky --tags=~@todo --tags=~@skip features/" - test_output=$(godog $tags --tags=~@flaky --tags=~@todo --tags=~@skip features/ 2>&1) + # Use godog directly for tag filtering with exclusion and WIP inclusion + echo "🚀 Running: godog $tags --tags=~@flaky --tags=~@todo --tags=~@skip --tags=@wip features/" + test_output=$(godog $tags --tags=~@flaky --tags=~@todo --tags=~@skip --tags=@wip features/ 2>&1) else - # Use go test for full test suite with tag exclusion - echo "🚀 Running: go test ./features/... -tags=~@flaky,~@todo,~@skip" - test_output=$(go test ./features/... -tags=~@flaky,~@todo,~@skip -v -cover -coverpkg=./... -coverprofile=coverage.out 2>&1) + # Use go test for full test suite with tag exclusion and WIP inclusion + echo "🚀 Running: go test ./features/... -tags=~@flaky,~@todo,~@skip,@wip" + test_output=$(go test ./features/... -tags=~@flaky,~@todo,~@skip,@wip -v -cover -coverpkg=./... -coverprofile=coverage.out 2>&1) fi test_exit_code=$? diff --git a/scripts/test-all-features-parallel.sh b/scripts/test-all-features-parallel.sh index 45ff1bd..57d158d 100755 --- a/scripts/test-all-features-parallel.sh +++ b/scripts/test-all-features-parallel.sh @@ -43,9 +43,9 @@ run_feature_test() { docker exec dance-lessons-coach-postgres createdb -U postgres "${DLC_DATABASE_NAME}" fi - # Run the feature tests with tag exclusion + # Run the feature tests with tag exclusion and WIP inclusion cd "features/${feature_name}" - FEATURE=${feature_name} DLC_DATABASE_NAME="${DLC_DATABASE_NAME}" go test -v . -tags="~@flaky && ~@todo && ~@skip" 2>&1 | grep -E "(PASS|FAIL|RUN)" || true + FEATURE=${feature_name} DLC_DATABASE_NAME="${DLC_DATABASE_NAME}" go test -v . -tags="~@flaky && ~@todo && ~@skip && @wip" 2>&1 | grep -E "(PASS|FAIL|RUN)" || true # Cleanup cd ../.. diff --git a/scripts/test-feature.sh b/scripts/test-feature.sh index ff80da2..8facdb5 100755 --- a/scripts/test-feature.sh +++ b/scripts/test-feature.sh @@ -110,7 +110,7 @@ run_feature_tests() { # Run tests with proper coverage measurement and tag exclusion set +e - test_output=$(go test ./features/${FEATURE}/... -tags=~@flaky,~@todo,~@skip -v -cover -coverpkg=./... -coverprofile=coverage-${FEATURE}.out 2>&1) + test_output=$(go test ./features/${FEATURE}/... -tags=~@flaky,~@todo,~@skip,@wip -v -cover -coverpkg=./... -coverprofile=coverage-${FEATURE}.out 2>&1) test_exit_code=$? set -e