skillfed

testing

Testing guides you through designing effective test suites, writing unit and integration tests, and applying test-driven development practices. It covers test strategy, the AAA pattern, test fixtures, mocking dependencies, and framework-specific approaches for React, Angular, Python, Java, and Kotlin.

Testing helps you write and execute unit tests, integration tests, and test-driven development strategies across multiple frameworks.

AI-generated summary based on this skill's SKILL.md

1 0 MIT updated by josavicentevw

Install

josavicentevw/ai-agent-skills/testing · repository language: Python

git clone https://github.com/josavicentevw/ai-agent-skills
cp -r ai-agent-skills/skills/testing ~/.claude/skills/testing
npx skillfed install josavicentevw/ai-agent-skills/testing

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How to write unit tests for my code components?

Testing helps you write unit tests by covering the AAA pattern (Arrange, Act, Assert), test fixtures, and mocking dependencies. Testing guides you through framework-specific approaches for React with Jest, Angular with Jasmine/Karma, Python with pytest, Java with JUnit, and Kotlin. Start by isolating a single component or function, set up its inputs, execute the code, and verify the output matches expectations.

What is test-driven development and how do I implement it?

Testing covers test-driven development (TDD) as a workflow where you write tests before implementation. The process involves writing a failing test, implementing minimal code to pass it, then refactoring. Testing guides you through this cycle, helping you design comprehensive testing strategies and understand the test pyramid—unit tests at the base (most numerous), integration tests in the middle, and end-to-end tests at the top (fewest).

How can I improve test coverage and analyze coverage metrics?

Testing helps you analyze and improve test coverage metrics by showing how much of your codebase is exercised by tests. Testing guides you through setting coverage goals aligned with the test pyramid, identifying untested code paths, and balancing coverage with practical testing priorities. Tools vary by framework—Jest for JavaScript, pytest for Python, JUnit for Java—each providing coverage reports to track progress.

How do I set up integration and API testing infrastructure?

Testing covers setting up integration and API testing infrastructure by teaching you to test multiple components together and verify API endpoints. Testing guides you through frameworks like FastAPI's TestClient, Spring Boot's testing utilities, and general patterns for mocking external dependencies. You'll learn to test database interactions, HTTP requests, and service-to-service communication while keeping tests reliable and avoiding flaky test failures.

What testing strategy should I use for microservices?

Testing guides you through designing a comprehensive testing strategy for microservices using the test pyramid: many fast unit tests, fewer integration tests between services, and selective end-to-end tests. Testing covers test automation best practices, CI/CD pipeline integration, mocking external dependencies, and managing test fixtures for setup and teardown. This approach balances speed, reliability, and confidence across distributed systems.

How do I mock external dependencies and handle test fixtures?

Testing teaches you to mock external dependencies and manage test fixtures for reliable, isolated tests. Testing covers fixture setup and teardown patterns, mocking frameworks specific to your language (Jest mocks for JavaScript, pytest fixtures for Python, Spring's @MockBean for Java), and BDD-style given-when-then testing approaches. Proper mocking prevents flaky tests and ensures your tests run fast without external service calls.

SKILL.md

rendered from the published skill — quoted content, verbatim

Testing

A comprehensive testing skill that helps design, implement, and maintain effective test suites across different testing levels and frameworks.

Quick Start

Basic testing workflow:

# Identify testable components
# Design test cases
# Implement tests following patterns
# Run tests and verify coverage
# Maintain and refactor tests

Core Capabilities

1. Test Strategy Design

Plan comprehensive testing approaches:

  • Test Pyramid: Balance unit, integration, and E2E tests
  • Test Coverage: Identify what needs testing
  • Test Data: Design test fixtures and mocks
  • Test Environments: Configure test infrastructure
  • CI/CD Integration: Automate test execution
2. Unit Testing

Test individual components in isolation:

  • Function Tests: Test pure functions and methods
  • Class Tests: Test class behavior and state

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 4 files
skills/testing/EXAMPLES_STACK.md
skills/testing/SKILL.md
skills/testing/examples/01-react-component-tests.md
skills/testing/examples/README.md

Related skills

Tags

quality-assurance test-frameworks code-coverage mock-testing behavior-driven continuous-integration test-automation debugging-tests test-infrastructure