bee:testing-anti-patterns

Identify testing anti-patterns like mock abuse and test-only production methods.

2|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/luanrodrigues/ia-frmwrk --skill bee-testing-anti-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bee:testing-anti-patterns
Source: https://github.com/luanrodrigues/ia-frmwrk/tree/main/default/skills/testing-anti-patterns
Command: npx skills add https://github.com/luanrodrigues/ia-frmwrk --skill bee-testing-anti-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents common testing anti-patterns that lead to brittle, unreliable, and misleading tests, ensuring your test suite accurately reflects real behavior.

Core Features & Use Cases

  • Guard Against Mock Abuse: Ensures tests verify actual code behavior, not just mock configurations.
  • Maintain Production Purity: Prevents test-specific methods from polluting production code.
  • Promote Dependency Understanding: Encourages thorough analysis before mocking.
  • Use Case: When reviewing a test that seems to pass but doesn't catch a known bug, this skill helps identify if the test is actually verifying mock behavior instead of the real system's output.

Quick Start

Use the bee:testing-anti-patterns skill to review the provided test code for common anti-patterns.

Frequently Asked Questions about bee:testing-anti-patterns

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

FAQPage Schema
Unit tests that pass but miss real bugs often occur because the test verifies mock behavior instead of actual code behavior. This testing anti-pattern creates a false sense of security by validating mock configurations rather than the real system's output.

Unit tests that pass but miss real bugs often occur because the test verifies mock behavior instead of actual code behavior. This testing anti-pattern creates a false sense of security by validating mock configurations rather than the real system's output.

How do I prevent test-only methods from polluting production code?

To prevent test-only methods from polluting production code, enforce production purity by reviewing code interactions. This ensures test-specific methods are not introduced into production logic, maintaining clean boundaries between test infrastructure and application code.

What are common mocking anti-patterns in TDD?

Common mocking anti-patterns in TDD include mocking dependencies without understanding their side effects and testing mock behavior instead of real outputs. These practices lead to brittle tests that fail to accurately reflect real system behavior.

How do I review existing test code for common testing anti-patterns?

Review existing test code for common testing anti-patterns by analyzing test logic and production code interactions. Identify mock abuse, verify actual behavior is tested, and check for test-specific methods improperly introduced into production code.

When should I avoid mocking dependencies in unit testing?

Avoid mocking dependencies in unit testing when you lack a thorough understanding of their side effects. Mocking without analyzing dependency behavior leads to misleading tests that do not accurately verify robust and reliable software interactions.