test-expert_skill

This skill helps you write effective tests, apply TDD, and improve coverage across Python and JavaScript projects for higher quality.
  • Python

116

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill einverne/dotfiles --skill test-expert

  • SKILL.md9.0 KB

Overview

This skill helps developers design and implement effective tests, adopt test-driven development (TDD), and raise test quality across unit, integration, and end-to-end levels. I focus on practical patterns, tooling tips for Python (pytest) and other ecosystems, and measurable coverage goals to keep your project safe to change. Use this skill to build reliable, fast, and maintainable test suites.

How this skill works

I inspect code layout, testing targets, and current test practices, then recommend concrete tests, fixtures, and CI steps. I guide you through the Red-Green-Refactor TDD loop, suggest what to mock or stub, and translate testing principles into examples and test names. I also provide coverage goals, test organization patterns, and CI configuration snippets to integrate tests into your workflow.

When to use it

  • You need to write tests for new or existing code
  • You want to adopt or improve TDD practices
  • You need higher confidence before refactoring critical logic
  • You want to design stable integration or E2E tests
  • You want actionable guidance for pytest, mocking, or CI pipelines

Best practices

  • Follow the Test Pyramid: many unit tests, some integration, few E2E
  • Write tests first where feasible; use Red-Green-Refactor
  • Keep tests FAST, ISOLATED, and SELF-VALIDATING (FIRST)
  • Use AAA (Arrange, Act, Assert) and descriptive test names
  • Mock external services, seed random data, and avoid flakiness
  • Aim for 80%+ coverage overall; 100% for critical paths only

Example use cases

  • Create unit tests and parameterized cases for a Calculator class using pytest
  • Design integration tests that exercise database persistence with setup/teardown fixtures
  • Implement TDD for a new API endpoint: write failing tests, implement minimal code, then refactor
  • Replace slow external calls with mocks in unit tests and write one integration test against a test database
  • Add CI steps to run pytest with coverage and upload reports to a coverage service

FAQ

Begin by writing tests around small, well-understood modules or bugs. Create failing tests that capture desired behavior, implement minimal fixes, then iterate with refactors. Introduce fixtures and dependency injection to make code testable.

When should I mock vs use real services?

Mock for external APIs, slow operations, non-deterministic behavior, or hard-to-trigger errors. Use real services for integration tests with an isolated test environment to validate interactions end-to-end.

What coverage target should I set?

Aim for 80%+ overall and 100% for critical business logic. Prioritize meaningful tests over raw coverage numbers; avoid testing framework code or trivial getters.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational