Skip to content
cccskills
FreePublished on GitHub

bdd-test-runner

Runs BDD-compliant GIVEN-WHEN-THEN tests, validates naming compliance, and analyzes coverage. Use when running tests, checking BDD compliance, validating test patterns, or verifying that test names follow GIVEN-WHEN-THEN conventions. Make sure to use this skill whenever tests need to be executed — it validates naming compliance and catches convention violations that plain test runners miss.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67 stars(GitHub 67 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md3.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

BDD Test Runner & Compliance Validator

Executes GIVEN-WHEN-THEN tests with compliance validation and coverage analysis.

Instructions

1. Understand Test Request

Common requests:

  • "Run all tests" → ./gradlew test
  • "Run compiler tests" → ./gradlew :compiler:test
  • "Run specific tests" → ./gradlew :compiler:test --tests "*Pattern*"
  • "Validate test naming" → BDD compliance check only
  • "Check coverage" → Coverage analysis

2. Pre-Execution BDD Compliance Check

Unit tests live in compiler/, codegen-runtime/, gradle-plugin/, compiler-api/ and build-logic/ (src/test/kotlin); sample tests live under samples/*/src/*Test/.

TEST_DIRS="compiler/src/test codegen-runtime/src/test gradle-plugin/src/test compiler-api/src/test build-logic/src/test"

# Count GIVEN-WHEN-THEN tests
grep -rh "fun \`GIVEN" $TEST_DIRS | wc -l

# Forbidden "should" naming — expect zero matches
grep -rn "fun \`should" $TEST_DIRS

Compliance checklist:

  • All test methods use GIVEN-WHEN-THEN naming (uppercase)
  • No "should" pattern (forbidden)
  • All classes have @TestInstance(TestInstance.Lifecycle.PER_CLASS)
  • Vanilla assertions only (no custom matchers)
  • No mocks (use fakes)

If violations found — report and do not proceed until acknowledged:

BDD COMPLIANCE VIOLATION

Found {count} tests using "should" pattern (forbidden)
Files: {list}
Reference: .claude/docs/development/validation/testing-guidelines.md

3. Execute Tests

# All tests (from the repository root)
./gradlew test

# One module (:compiler, :codegen-runtime, :gradle-plugin, :compiler-api)
./gradlew :codegen-runtime:test

# Pattern-based
./gradlew :compiler:test --tests "*{Pattern}*"

# Samples (built against the published plugin)
make publish-local && make test-sample

4. Analyze Results

Parse output: total run, passed, failed, skipped, execution time.

If failures: categorize each failure and suggest relevant skills:

  • Compilation errors → compilation skill
  • Test logic errors → fix test or implementation
  • Missing imports → check generated code

5. Coverage Analysis

List source files with no matching *Test.kt in the module you changed (a heuristic — some classes are covered through other tests):

MODULE=codegen-runtime   # or compiler, gradle-plugin, compiler-api
find $MODULE/src/main/kotlin -name "*.kt" | while read file; do
    testFile="${file/src\/main/src\/test}"
    testFile="${testFile/.kt/Test.kt}"
    if [ ! -f "$testFile" ]; then
        echo "Missing tests for: $file"
    fi
done

6. Report

BDD TEST EXECUTION REPORT

Compliance: {PASSED/FAILED}
- GIVEN-WHEN-THEN naming: {count}/{total} ✅
- "should" violations: {count}

Execution:
- Total: {n} | Passed: {n} | Failed: {n} | Skipped: {n}
- Time: {duration}

Coverage:
- Implementation files: {n} | Test files: {n}
- Coverage gaps: {list if any}

Follow-up suggestions:

  • If coverage gaps → offer to write GIVEN-WHEN-THEN tests for them
  • If failures → suggest fixes or relevant skills

Related Skills

  • compilation — Validate code compiles

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Documents the Fakt code generation pipeline — immutable AST model, builder DSL, renderer, default value strategies, and extension functions. Use when modifying code generation, changing generated output, adding new generated patterns, understanding builders or renderers, adding a new default value strategy, or debugging generated output. Make sure to use this skill whenever generated Kotlin code needs to change — the pipeline has strict conventions (immutable AST, builder DSL, renderer separation) that must be followed even for small changes.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

commit

Free

Creates project commits — Conventional Commits format, message quality (72 char subject, 80 char body), staged-change checks, and the AI co-author trailer. Use when committing changes, running /commit, creating commit messages, or reviewing commit message quality. Make sure to use this skill whenever a git commit is being created — it is the project's commit workflow and replaces the default one.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

Validates compilation of generated Fakt fakes and diagnoses build failures — where fakes are generated, which path produced them, error classification, and root cause analysis. Use when compilation fails, generated code has errors, no fakes were generated, validating changes compile before committing, or checking if generated code is valid. Make sure to use this skill whenever a build error mentions generated fakes or the Fakt plugin — even if the root cause might be elsewhere, this skill's error classification pinpoints the actual source.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

Guides step-by-step through all 11 touchpoints for adding a new @Fake annotation option (like mutability or callHistory). Covers annotation enum, CLI processor, Gradle plugin, FIR metadata, FIR translator, the shared FakeDeclaration model, and code generators. Use when adding a new option to @Fake, adding a new enum to the annotation, making something configurable per-interface, implementing a new compiler plugin feature flag, adding a new Gradle extension property, or extending the three-tier resolution (annotation → plugin → default). Make sure to use this skill whenever a change touches more than one layer of the option pipeline, even for small additions like a new enum value.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

Creates well-structured GitHub issues using gh CLI with auto-detected project context (version, platform, module). Supports bug reports, feature requests, and internal tasks following repo templates. Use when creating a GitHub issue, reporting a bug, requesting a feature, logging a task, documenting a TODO as an issue, or recording a bug found during development. Make sure to use this skill whenever an issue needs to be created — it auto-detects project context and applies the correct template.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

Checks Kotlin compiler API usage against the Kotlin versions Fakt supports — which path runs on which compiler, how compat shims are written, how to verify across versions, and how to bump Kotlin. Use when calling a new FIR/IR/compiler-plugin API, seeing NoSuchMethodError, NoSuchFieldError or NoClassDefFoundError from compiler classes, bumping the Kotlin version, or checking whether an API exists in the minimum supported Kotlin. Make sure to use this skill whenever compiler plugin code starts using a Kotlin compiler API it didn't use before — these APIs change between Kotlin releases and a break only shows up on an older supported version.

The English summary is being prepared. Showing the original description.

rsicarelli/fakt67Updated Oct 23, 2026

See all skills by rsicarelli

Report a problem with this skill