agentleFS
jggomezjggomez/expert-ai-developer-skills/skills/testing-expert/SKILL.md

testing-expert

Skill28 starsChanged 3 months agoApache-2.0View on GitHub

Guidelines, best practices, and templates for automated and manual software testing across languages. Covers Arrange-Act-Assert (AAA), mocking boundaries, and writing human-readable specifications using Gherkin BDD syntax.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Assert: Verify the expected outcome with specific, unambiguous assertions.

    line 39
  2. Very specific:

    Claude Code: Run validate_gherkin.py via bash to audit .feature files.

    line 61
  3. Distinctive:

    Antigravity: Verify BDD specifications before generating test step definitions.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing Expert Skill

Overview

This skill guides the design, structuring, and validation of automated test suites and Behavior-Driven Development (BDD) specifications. It acts as a Lead QA Engineer and Test Automation Specialist, ensuring that tests are hermetic, isolated, self-documenting, structured using the Arrange-Act-Assert (AAA) pattern, and specified using valid Gherkin syntax.

When to Use

Trigger Scenarios

  • Designing test suites across the testing pyramid (Unit, Component, Integration, System).
  • Authoring human-readable BDD specifications using Gherkin (.feature files).
  • Standardizing test structures using the Arrange-Act-Assert (AAA) convention.
  • Auditing and validating Gherkin scenario syntax and parameterization tables.

When NOT to Use

  • Day-to-day TDD implementation cycle: Route to test-driven-development or code-implementer.
  • E2E user journey test execution and RTM reporting: Route to qa-tester.
  • CI/CD pipeline test runner setup: Route to build-and-ci-gates.
  • Static code smell scanning: Route to code-smells-expert.

Process

Phase 1: BDD Specification Design in Gherkin

Draft human-readable feature specifications using standard Gherkin keywords:

  • Feature: High-level business capability being validated.
  • Background: Shared setup prerequisites across scenarios in the feature.
  • Scenario / Scenario Outline: Discrete behavioral specification.
    • Given: Initial state or prerequisite setup.
    • When: Specific action or event triggered by the user/system.
    • Then: Observable outcome and expected assertion.
    • Examples: Parameterization table mapping boundary values.

Phase 2: Hermetic AAA Test Layout

Structure both unit and integration tests strictly according to the AAA pattern:

  1. Arrange: Set up inputs, mocks, test fixtures, and expected parameters.
  2. Act: Execute the single unit of behavior under test.
  3. Assert: Verify the expected outcome with specific, unambiguous assertions. Hermeticity Rule: Every test must be completely isolated, with zero state carried over between test executions.

Phase 3: Automated Gherkin Syntax Validation

Execute the Gherkin validator script to detect structural defects (missing Examples tables, bad Background ordering, duplicate names, or step-less scenarios):

python3 ./skills/testing-expert/scripts/validate_gherkin.py

Usage

Commands & Automation Scripts

# Validate all Gherkin .feature files in the repository
python3 ./skills/testing-expert/scripts/validate_gherkin.py

Example Prompts

  • "Write Gherkin BDD scenarios for the password reset workflow, covering happy paths and lockout boundaries."
  • "Structure this integration test suite using strict Arrange-Act-Assert partitions and hermetic mocks."
  • "Validate all .feature files in our tests directory for syntax errors."

Host Execution Instructions

  • Claude Code: Run validate_gherkin.py via bash to audit .feature files.
  • Antigravity: Verify BDD specifications before generating test step definitions.

Red Flags

  • Order-dependent tests that fail when run in isolation or random order.
  • Scenario Outline blocks missing the required Examples: data table.
  • Testing multiple unrelated behaviors inside a single test case.
  • Calling external live third-party network APIs in unit or integration test suites.

Verification

  • Automated Gherkin validator passes cleanly with zero syntax violations:
    python3 ./skills/testing-expert/scripts/validate_gherkin.py
  • All tests follow Arrange-Act-Assert (AAA) separation.
  • External network and database dependencies mocked in unit test suites.
  • Scenarios test externally visible behavior rather than internal private state.

References

  • Software Testing Best Practices Reference
  • Behavior-Driven Development (BDD) & Gherkin Syntax

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.