From test-writing
Reviews Shopware PHPUnit unit tests for quality and compliance with conventions on structure, naming, attributes, mocking strategy, and behavior-focused testing.
npx claudepluginhub shopwarelabs/ai-coding-tools --plugin test-writingThis skill is limited to using the following tools:
Reviews a Shopware PHPUnit unit test for compliance with testing guidelines and best practices.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Reviews a Shopware PHPUnit unit test for compliance with testing guidelines and best practices.
Performs MCP-driven review of PHPUnit unit tests against Shopware testing conventions, organized by rule group (convention → design → unit → isolation → provider).
Category-aware: Rules are scoped to test categories (A: DTO, B: Service, C: Flow/Event, D: DAL, E: Exception) via MCP mcp__plugin_test-writing_test-rules__list_rules filtering.
Output: Structured report with code snippets and suggested fixes per output-format.md.
Glob("tests/unit/**/*Test.php"))tests/unit/ directory (abort if tests/integration/)TestCase or appropriate base class#[CoversClass]) — needed by rules that analyze test-to-code-path coveragemcp__plugin_test-writing_test-rules__list_rules(test_type=unit, test_category={detected_category}) to get all applicable rule IDsgroup: convention, design, unit, isolation, providerCovers naming, attributes, TestDox, assertions, class structure, and method ordering.
group=conventionmcp__plugin_test-writing_test-rules__get_rules(ids={comma-separated convention IDs})Covers conditionals, single behavior, test redundancy, data provider usage, and coverage distribution.
group=designmcp__plugin_test-writing_test-rules__get_rules(ids={comma-separated design IDs})Covers behavior vs implementation focus, mocking strategy, and call-count coupling.
group=unitmcp__plugin_test-writing_test-rules__get_rules(ids={comma-separated unit IDs})Covers FIRST principles (Independent, Repeatable), shared state, fixtures, and feature flags.
group=isolationmcp__plugin_test-writing_test-rules__get_rules(ids={comma-separated isolation IDs})Covers data provider key quality, naming, yield patterns, and TestDox parameters.
group=providermcp__plugin_test-writing_test-rules__get_rules(ids={comma-separated provider IDs})For output format and examples, see output-format.md.
Report each issue using the rule's ID and title from mcp__plugin_test-writing_test-rules__get_rules:
### [{rule_id}] {title}
Include for each issue:
Include full passed checks list.
errors:
- rule_id: {from mcp__plugin_test-writing_test-rules__get_rules response}
title: {from mcp__plugin_test-writing_test-rules__get_rules response}
enforce: must-fix
location: ClassTest.php:45
current: |
# problematic code
suggested: |
# fixed code
warnings:
- rule_id: {from mcp__plugin_test-writing_test-rules__get_rules response}
title: {from mcp__plugin_test-writing_test-rules__get_rules response}
enforce: should-fix
location: ClassTest.php:78
current: |
# code
suggested: |
# improved code
When test characteristics match multiple categories:
#[CoversClass]expectException presentWhen a test class contains both unit and integration patterns:
If mcp__plugin_test-writing_test-rules__list_rules or mcp__plugin_test-writing_test-rules__get_rules tools are unavailable:
| Status | Condition |
|---|---|
| PASS | 0 errors, 0 warnings |
| NEEDS_ATTENTION | 0 errors, 1+ warnings |
| ISSUES_FOUND | 1+ errors |
For complete report structure and templates, see output-format.md.