Command Palette

Search for a command to run...

Назад к скиллам
скилл № 30999

Test Quality Inspector

Systematically inspect unit and E2E tests to verify they test the right behavior, provide meaningful coverage, and catch real regressions

БесплатноБез исполняемых скриптов
bobmatnycот bobmatnyc★ 160 звёзд на GitHub20 установок в других каталогах

Установить Test Quality Inspector в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Test Quality Inspector

Purpose

Engineers often write tests that pass without actually testing the right thing. This skill provides systematic inspection techniques to verify tests are:

  • Testing real behavior, not implementation details
  • Making meaningful assertions
  • Catching actual failures
  • Providing value, not just coverage

When to Use This Skill

Activate this skill when:

  • After engineer creates tests - Verify tests are effective
  • Before QA sign-off - Don't approve without inspecting tests
  • Test failures seem suspicious - "Why didn't this catch the bug?"
  • Tests pass but bugs occur - Tests aren't testing the right thing
  • Coverage is high but confidence is low - Coverage ≠ quality
  • Refactoring existing tests - Improve test effectiveness

The Inspection Framework

Phase 1: Intent Analysis

Question: What is this test supposed to verify?

1. Read test name
2. Read test description/docstring
3. Identify claimed behavior
4. Note expected outcome

Red Flags:

  • Vague test names ("test_user_creation")
  • No description of expected behavior
  • Tests named after methods, not behaviors
  • "Test that X works" (what does "works" mean?)

Phase 2: Setup Analysis

Question: Is the test setup realistic?

1. Examine test fixtures/setup
2. Check data realism
3. Verify state initialization
4. Identify mocks/stubs

Red Flags:

  • Mock data that would never occur
  • Missing required dependencies
  • Overly simplified scenarios
  • Setup that bypasses real constraints

Phase 3: Execution Analysis

Question: Does the test exercise real behavior?

1. Trace execution path
2. Identify what's actually called
3. Check if mocks override real behavior
4. Verify integration points

Red Flags:

  • Mocking the system under test
  • Testing mock behavior instead of real behavior
  • Execution path doesn't match intent
  • Critical code paths not exercised

Phase 4: Assertion Analysis

Question: Do assertions verify the claimed behavior?

1. Examine each assertion
2. Map assertions to intent
3. Check assertion strength
4. Verify failure conditions

Red Flags:

  • Weak assertions ("assert result is not None")
  • Asserting existence, not correctness
  • Missing assertions for error cases
  • Assertions on mocks instead of real outputs

Phase 5: Failure Analysis

Question: What would make this test fail?

1. Introduce intentional bugs
2. Check if test catches them
3. Verify error messages are meaningful
4. Test failure scenarios explicitly

Red Flags:

  • Test passes with obviously broken code
  • Removing functionality doesn't fail test
  • Error messages don't indicate what failed
  • No negative test cases

Inspection Checklist

Use this checklist for every test you inspect:

Intent Verification

  • Test name describes behavior, not implementation
  • Expected behavior is clearly stated
  • Success criteria are explicit
  • Test has a single clear purpose

Setup Quality

  • Test data is realistic
  • Required dependencies are present
  • State initialization is valid
  • Mocks are justified and complete

Execution Quality

  • Real code paths are exercised
  • System under test is not mocked
  • Integration points are tested
  • Side effects are verified

Assertion Quality

  • Assertions match stated intent
  • Assertions are specific and meaningful
  • Both success and failure cases tested
  • Error conditions are verified

Regression Prevention

  • Test would catch known bug patterns
  • Boundary conditions are tested
  • Edge cases are covered
  • Failure modes are explicit

Common Test Smells

1. The Optimistic Asserter

# BAD: Only tests happy path
def test_user_login():
    user = create_user("[email protected]", "password123")
    assert user is not None  # Weak!

Issues:

  • Doesn't test login actually works
  • Weak assertion (not None)
  • Missing: wrong password, locked account, etc.

Improvement:

def test_user_login_with_valid_credentials_returns_authenticated_session():
    user = create_user("[email protected]", "password123")
    session = login(user.email, "password123")

    assert session.is_authenticated
    assert session.user_id == user.id
    assert session.expires_at > datetime.now()

def test_user_login_with_invalid_password_raises_authentication_error():
    user = create_user("[email protected]", "password123")

    with pytest.raises(AuthenticationError) as exc:
        login(user.email, "wrong_password")

    assert "Invalid credentials" in str(exc.value)

2. The Mock Tester

# BAD: Testing mock behavior
def test_email_sending():
    mock_smtp = Mock()
    mock_smtp.send.return_value = True

    result = send_email(mock_smtp, "[email protected]", "Hello")

    assert mock_smtp.send.called  # Testing mock!
    assert result is True  # Mock's return value!

Issues:

  • Tests mock behavior, not re
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • examples/example-inspection-report.md
  • references/assertion-quality.md
  • references/inspection-checklist.md
  • references/red-flags.md

FAQ

Что делает скилл Test Quality Inspector?

Systematically inspect unit and E2E tests to verify they test the right behavior, provide meaningful coverage, and catch real regressions

Как установить скилл Test Quality Inspector?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Test Quality Inspector запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Test Quality Inspector с