x-bdd-fake-green

Audit BDD steps for fake green outcomes and enforce honest pass/fail semantics.

2|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/pure-golang/level85 --skill x-bdd-fake-green
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-bdd-fake-green
Source: https://github.com/pure-golang/level85/tree/main/.agents/skills/x-bdd-fake-green
Command: npx skills add https://github.com/pure-golang/level85 --skill x-bdd-fake-green

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you detect and eliminate BDD “fake green” where scenarios pass while not actually verifying the real production behavior, preventing self-deception and silently weak tests.

Core Features & Use Cases

  • Fake green auditing: Identifies step patterns where Given/When/Then manipulate local state but never exercise production paths or observable outcomes.
  • Assertion integrity checks: Flags local error/response substitutions (e.g., LastErr = fmt.Errorf(...), synthetic gRPC status) and “success-by-any-error” assertions that mask failures.
  • When-to-pending guidance: Guides turning “undefined/pending into green” into honest godog.ErrPending when real checks are not currently available.
  • Browser BDD safeguards: Detects DOM/page-object-only assertions and missing Playwright actions that would otherwise keep scenarios green without real UI verification.
  • Use Case: During a BDD translation or refactor, it audits that every green scenario would fail if the corresponding service/handler/adapter contract is broken.

Quick Start

Ask the assistant to review your godog or playwright-bdd steps for “fake green” by scanning for local state-only updates and require real observable production calls or return godog.ErrPending when that verification cannot be performed.

Frequently Asked Questions about x-bdd-fake-green

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is a fake green outcome in BDD testing?

A fake green outcome in BDD testing occurs when scenarios pass without verifying real production behavior, often because Given/When/Then steps only mutate local state or inject synthetic results instead of exercising actual code paths.

How do I detect fake green tests in godog and playwright-bdd?

You detect fake green tests in godog and playwright-bdd by auditing step definitions to ensure they require observable production calls or verifiable external-boundary effects, flagging local error injection patterns and DOM-only assertions that bypass real UI verification.

How do I handle undefined or pending BDD steps honestly?

Handle undefined or pending BDD steps honestly by returning godog.ErrPending when real checks are not currently available, rather than forcing scenarios to green with local state mutations or synthetic success assertions.

Does BDD test integrity auditing work with local error substitutions?

BDD test integrity auditing flags local error substitutions like LastErr assignments or synthetic gRPC status injections, identifying success-by-any-error assertions that mask failures and break honest pass/fail semantics.

Why does my BDD scenario pass when the service contract is broken?

Your BDD scenario passes when the service contract is broken because the step definitions manipulate local state without making observable production calls, creating a fake green outcome that silently masks missing verification.

What are the limitations of BDD fake green detection?

BDD fake green detection requires step definitions to be auditable for observable production calls or external-boundary effects, and cannot verify scenarios where production paths are inherently inaccessible or where local state mutations are indistinguishable from real behavior.