mock-detection

Analyze test files for mock appropriateness and T1-T4 violations.

8|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/QBall-Inc/the-bulwark --skill mock-detection-qball-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mock-detection
Source: https://github.com/QBall-Inc/the-bulwark/tree/main/skills/mock-detection
Command: npx skills add https://github.com/QBall-Inc/the-bulwark --skill mock-detection-qball-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill identifies inappropriate or excessive mocking in tests, which can lead to false confidence and incomplete verification, ensuring tests accurately reflect the behavior they claim to test.

Core Features & Use Cases

  • Mock Appropriateness Analysis: Evaluates if mocks are used correctly based on test type (unit, integration, E2E).
  • Violation Detection: Identifies specific patterns like mocking the system under test (T1), verifying calls without results (T2), or mocking integration boundaries (T3).
  • Scope Tracking: Determines the full impact of a violation on test effectiveness.
  • Use Case: When running a test audit, this skill analyzes flagged test files to pinpoint tests that use mocks in a way that undermines their purpose, providing actionable insights to improve test reliability.

Quick Start

Analyze the provided test files for mock appropriateness and potential violations.

Frequently Asked Questions about mock-detection

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

FAQPage Schema
How do I detect inappropriate mocking in unit tests?

Detect inappropriate mocking by analyzing test files for specific violation patterns, such as mocking the system under test (T1) or verifying calls without results (T2), ensuring tests actually reflect their claimed behavior.

What are common mock violation patterns in integration testing?

Common mock violations in integration testing include mocking the system under test (T1), verifying calls without results (T2), and mocking integration boundaries (T3), which undermine test effectiveness and create false confidence.

How does call graph tracing improve test quality audits?

Call graph tracing improves test audits by performing deep mock appropriateness analysis to detect T1-T4 violations and tracking the violation scope to calculate actual test effectiveness.

Can I use mock appropriateness analysis for E2E test audits?

Mock appropriateness analysis evaluates if mocks are used correctly based on test types including E2E, pinpointing tests that use mocks in ways that undermine their purpose and providing actionable insights to improve reliability.

What is the scope of a mocking violation in test effectiveness calculation?

The scope of a mocking violation in test effectiveness calculation determines the full impact of the violation on the test, tracking how excessive mocking leads to false confidence and incomplete verification.

When should I run a deep mock analysis during a test audit?

Run a deep mock analysis during a test audit when specific test files are flagged for deep analysis, requiring classification output to pinpoint tests using mocks in ways that undermine their purpose.