LLM Skills
~/catalogue/tests et qualité//test
Tests et qualitésource GitHub

Lanceur de tests intelligent

/test

Je lance intelligemment les tests selon le contexte actuel et j’aide activement à corriger les échecs.

notlikeDevnotlikeDev
2.8k
7 octobre 2025
MIT License
// contenu du skill

Smart Test Runner - Context Aware

I'll intelligently run tests based on your current context and actively help fix failures.

Context Detection First:

Let me understand what context I'm in:

  1. Cold Start (no previous context):
  • Run full test suite with coverage
  • Generate complete health report
  • Identify chronic failures
  1. Active Session (you're implementing features):
  • Check git diff for modified files
  • Read CLAUDE.md for session goals
  • Test ONLY what you've been working on
  • Incremental testing as you code
  1. Post-Command Context:
  • After /scaffold: Test the new component
  • After /fix-todos: Test modified files
  • After /fix-imports: Re-run previously failed tests
  • After /security-scan: Security-focused tests
  • After /format: Quick smoke tests only
  1. Debug Context (previous test failures):
  • Focus on failed tests with verbose output
  • Add strategic debug logging
  • Run in isolation mode
  1. Pre-Commit Context:
  • Full suite + lint + typecheck
  • Coverage report for PR
  • No skipped tests allowed

Phase 1: Deep Project Analysis

Using native tools to understand your testing setup:

  • Glob to find configuration files in project root
  • Read test configurations and CI/CD workflows
  • Grep test patterns to understand testing style
  • Read documentation for test instructions

I'll detect:

  • Test frameworks and runners
  • Test file patterns and locations
  • Coverage requirements
  • Integration vs unit test separation
  • CI/CD test commands

Phase 2: Intelligent Test Execution

I'll run tests with appropriate flags for maximum insight based on your project's testing framework, using verbose output and fail-fast when available to quickly identify issues.

Build & Compilation Check:

  • Verify project builds successfully before running tests
  • Watch console output for compilation errors
  • Capture and analyze build warnings that might affect tests
  • Check for missing dependencies or version conflicts

Real-time Monitoring:

bash
# Monitor test execution with timestamps
# Capture both stdout and stderr
# Watch for timeout patterns
# Track memory usage if tests hang

Phase 3: Failure Analysis & Auto-Fix

When tests fail, I'll:

  1. Parse failure output to understand exact issues
  2. Read failing test to understand expectations
  3. Read implementation to find the bug
  4. Analyze patterns from similar tests that pass
  5. Apply fixes when confident

Common fixes I'll attempt:

  • Async/await timing issues
  • Mock/stub configuration
  • Import path problems
  • Type mismatches
  • Null/undefined handling
  • Off-by-one errors
  • Environment variable issues

Phase 4: Advanced Diagnostics

For complex failures:

  • Run single test in isolation
  • Add debug logging strategically
  • Check test dependencies and setup/teardown
  • Verify test data and fixtures
  • Analyze flaky test patterns

Log Analysis:

  • Read test output logs for hidden errors
  • Grep for common error patterns in console output
  • Analyze stack traces to pinpoint exact failure location
  • Check for environment-specific issues in logs
  • Identify resource conflicts (ports, files, databases)

Console Pattern Detection:

  • Memory leaks ("JavaScript heap out of memory")
  • Port conflicts ("address already in use")
  • Permission errors ("EACCES", "Permission denied")
  • Timeout issues ("Timeout - Async callback")
  • Module resolution failures
  • Database connection issues

Phase 5: Coverage & Quality

After fixing tests:

  • Run coverage report if available
  • Identify untested code paths
  • Suggest critical missing tests
  • Check for test anti-patterns

When I find multiple issues, I'll create a todo list to fix them systematically.

Build Failure Recovery:

If build fails before tests:

  • Analyze compilation errors in detail
  • Check for missing dependencies
  • Verify environment setup
  • Suggest specific fixes based on error patterns
  • Offer to install missing packages if detected

Smart Context-Based Strategy:

Based on the detected context, I'll choose the optimal approach:

  • No Context: Full test discovery and execution
  • Active Development: Watch mode on changed files only
  • Post-Implementation: Test coverage for new code
  • Debugging Mode: Isolated test with maximum verbosity
  • Pre-Deploy: Complete validation suite

Intelligent Test Selection:

bash
# Context: After implementing UserService
# I'll run: UserService tests + integration tests that use it

# Context: After /scaffold user-auth  
# I'll run: New user-auth tests + smoke tests

# Context: Fixing failing tests
# I'll run: Only the specific failing test with debug info

Session Awareness:

  • Read session goals from CLAUDE.md
  • Track all modified files during session
  • Prioritize tests based on session objectives
  • Generate session test report at the end

Integration with other commands:

  • After /test failures → `/create-tod
// source originale publique
notlikeDev/CCPlugins
/commands/test.md
Licence : MIT License
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.
// installer ce skill
Collez cette commande dans votre terminal à la racine de votre projet :
mkdir -p .claude/commands && curl -o ".claude/commands/test.md" "https://raw.githubusercontent.com/notlikeDev/CCPlugins/main/commands/test.md"
Ensuite dans Claude Code, tapez /test pour l'activer.
open_in_newVoir la source originale
// sauvegarder
Sauvegarde disponible après connexion.
loginSe connecter pour sauvegarder
// informations
CréateurnotlikeDev
Étoiles 2.8k
LicenceMIT License
Mis à jour7 octobre 2025
Format.md
AccèsGratuit
// similaires

Skills Tests et qualité

Voir toutarrow_forward