Complete toolkit for establishing Test-Driven Development (TDD) pipelines, structuring test suites, and isolating dependencies with Mocks. Use when refactoring fragile code, building CI/CD test gates, or setting up Cypress/Playwright End-to-End tests.
Comprehensive guidelines and tools for building deterministic, fast, and resilient automated test suites.
Script Paths: Gemini/Codex/cursorlike:
.agent_scripts/development_qa-testing/. Claude (folder mode):.claude/skills/development/qa-testing/scripts/.
This skill provides three core capabilities through automated scripts:
# Script 1: TDD Unit Test Boilerplate Generator
node .agent_scripts/development_qa-testing/tdd_generator.js [options]
# Script 2: Test Suite Flakiness Analyzer
node .agent_scripts/development_qa-testing/flakiness_analyzer.js [options]
# Script 3: E2E Page Object Scaffolder
node .agent_scripts/development_qa-testing/e2e_page_object.js [options]
Generates a foundational Jest/Pytest test file based on a class name, automatically stubbing out the "Arrange, Act, Assert" blocks.
Features:
beforeEach fixture reset blocksUsage:
node .agent_scripts/development_qa-testing/tdd_generator.js PaymentService --target unit
Parses CI test output logs over the last 10 runs to identify tests that randomly pass and fail without code changes.
Features:
sleep() calls instead of dynamic pollingUsage:
node .agent_scripts/development_qa-testing/flakiness_analyzer.js ./ci-logs/ --format json
Generates Page Object Model (POM) classes for Cypress/Playwright to keep End-to-End tests DRY and maintainable.
Features:
data-testid attributeslogin(user, pass))Usage:
node .agent_scripts/development_qa-testing/e2e_page_object.js LoginForm --framework cypress
Comprehensive guide available in references/tdd_and_mocking.md:
Technical reference guide in references/e2e_best_practices.md:
Frameworks: Jest, Vitest, Pytest, xUnit, Cypress, Playwright Concepts: TDD, BDD, AAA (Arrange, Act, Assert), Dependency Injection CI/CD Integration: GitHub Actions, SonarQube
IUserRepository to instantly return a dummy user.// Arrange
const repository = new MockRepository();
const service = new PaymentService(repository);
// Act
const result = await service.charge(100);
// Assert
expect(result.status).toBe('success');
After unit tests cover the logic, use Cypress/Playwright to visually click through the UI, interacting only with robust data-testid="submit-btn" selectors to ensure the backend and frontend are truly connected.
it('throws_ValidationError_when_email_is_missing') instead of it('tests email validation').new Date() instead of a mocked Date).references/tdd_and_mocking.mdreferences/e2e_best_practices.md.agent_scripts/development_qa-testing/ directorynpx skills add cagriemiracikkapi-projects/development/qa-testing下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer