unit-test-advisor

Identify gaps in domain unit tests and propose Given-When-Then structures.

1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/davidarce/devrune-starter-catalog --skill unit-test-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test-advisor
Source: https://github.com/davidarce/devrune-starter-catalog/tree/main/skills/unit-test-advisor
Command: npx skills add https://github.com/davidarce/devrune-starter-catalog --skill unit-test-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Domain unit tests face readability and maintenance challenges; this skill provides expert guidance on writing effective unit tests for domain logic following Given-When-Then.

Core Features & Use Cases

  • Guidance on test structure (Arrange-Act-Assert), naming conventions, and the Object Mother pattern to build reusable test data.
  • Best practices for mocking strategies, coverage requirements, and anti-patterns to avoid.
  • Use cases include teams adopting SDD for testing and developers seeking to improve unit-test quality.

Quick Start

Review domain unit tests with Given-When-Then patterns.

Frequently Asked Questions about unit-test-advisor

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

FAQPage Schema
How do I write unit tests using the Given-When-Then structure?

Unit tests using Given-When-Then arrange initial state, execute the domain action, and assert expected outcomes. This approach isolates domain logic through appropriate mocking strategies and builds reusable test data via the Object Mother pattern.

What is the Object Mother pattern for unit test data?

The Object Mother pattern for unit test data centralizes the creation of domain objects into reusable factory methods. It improves test readability and reduces maintenance by standardizing test data generation across multiple test cases.

How do I identify gaps in domain unit test coverage?

Identify gaps in domain unit test coverage by reviewing existing tests against domain logic requirements. Proposing a Given-When-Then structure highlights missing Arrange-Act-Assert scenarios and reveals where mocking strategies fail to isolate code.

What are common unit testing anti-patterns to avoid?

Common unit testing anti-patterns to avoid include over-mocking domain logic, neglecting Arrange-Act-Assert structure, and duplicating test data setup. Using the Object Mother pattern and proper mocking strategies prevents these maintenance and readability issues.

When should I use mocking strategies in domain unit tests?

Use mocking strategies in domain unit tests to isolate the specific business logic under evaluation. Mocking external dependencies ensures the Arrange-Act-Assert structure targets domain rules without side effects from external systems or database calls.

What is the best way to structure unit tests for domain logic?

The best way to structure unit tests for domain logic is the Given-When-Then format, which enforces the Arrange-Act-Assert pattern. This structure enhances readability and integrates reusable test data with targeted mocking strategies.