testing

Write unit, integration, and end-to-end tests using Arrange-Act-Assert patterns.

111|18|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill testing-dralgorhythm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/dralgorhythm/claude-agentic-framework/tree/main/.claude/skills/core-engineering/testing
Command: npx skills add https://github.com/dralgorhythm/claude-agentic-framework --skill testing-dralgorhythm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Outlines testing strategies across unit, integration, and end-to-end levels.

Core Features & Use Cases

  • Test Pyramid: Units, integration, and E2E balance.
  • Test Patterns: AAA, deterministic tests, clear names.
  • Use Case: Add tests for a new service and verify behavior.

Quick Start

Create a unit test for a small function and run the test suite.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I write unit tests for my code?

Unit tests verify individual functions or methods in isolation. Write tests using the Arrange-Act-Assert pattern: set up inputs, execute the function, and verify outputs. Run tests with npm test, pytest, or go test depending on your language. Focus on testing public interfaces to catch regressions early.

What's the best way to structure tests across unit, integration, and end-to-end levels?

The test pyramid balances coverage across three levels: many fast unit tests at the base, fewer integration tests in the middle, and minimal end-to-end tests at the top. Unit tests verify individual components, integration tests validate component interactions, and E2E tests confirm user workflows in the browser using Chrome DevTools.

How do I improve test coverage and identify untested code?

Run tests with coverage reporting enabled (npm test --coverage, pytest --cov, or go test -cover). Use Serena for symbol discovery to map which functions are exercised. Review coverage reports to find gaps, then add tests for edge cases and public interfaces that lack coverage.

Can I test browser workflows and user interactions?

Yes. End-to-end testing validates user interactions in the browser. Use Chrome DevTools to debug and trace browser-based flows. Write deterministic, isolated E2E tests that follow the Arrange-Act-Assert pattern to verify complete feature behavior from user perspective.

Why should tests be deterministic and isolated?

Deterministic tests produce consistent results regardless of execution order or external state. Isolated tests run independently without side effects or shared dependencies. These qualities ensure tests reliably catch regressions and provide confidence in code quality across feature development and bug fixes.

How do I handle edge cases in my test suite?

Identify boundary conditions and exceptional inputs for your functions. Write dedicated unit tests for edge cases: empty inputs, null values, maximum/minimum bounds, and error conditions. Document expected behavior clearly in test names so failures reveal exactly what assumption was violated.