unit-test-mockery-suite

Generate deterministic Go unit tests using mockery mocks and testify suites.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/cuenobi/golang-clean --skill unit-test-mockery-suite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unit-test-mockery-suite
Source: https://github.com/cuenobi/golang-clean/tree/main/.cursor/skills/unit-test-mockery-suite
Command: npx skills add https://github.com/cuenobi/golang-clean --skill unit-test-mockery-suite

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate and maintain deterministic unit tests for Go use cases by leveraging mockery-generated repository mocks and testify suite style to standardize testing structures across the codebase.

Core Features & Use Cases

  • Generates and refreshes mocks for repository interfaces located under internal/application/port/out.
  • Provides a suite-based testing pattern using testify's suite.Suite to structure tests and enforce TearDownTest validations.
  • Guides teams on how to add new tests, refactor fakes to mocks, and maintain consistent test quality across modules.

Quick Start

Run a focused test suite for a module using the go test command with an appropriate -run filter.

Frequently Asked Questions about unit-test-mockery-suite

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

FAQPage Schema
How do I standardize Go unit tests with mockery and testify suites?

Standardize Go unit tests by integrating mockery-generated mocks with testify suite.Suite structures, enforcing consistent test setup, deterministic inputs, and TearDownTest validations across use-case logic and repository interfaces.

What is the best way to generate mocks for Go repository interfaces?

Generating mocks for Go repository interfaces uses mockery to target interfaces under internal/application/port/out, producing deterministic mock implementations that integrate directly into testify suite-based tests.

Why use testify suites for Go use-case unit testing?

Using testify suites for Go use-case unit testing structures tests with suite.Suite to enforce deterministic fixtures and TearDownTest validations, ensuring repeatable mock expectations across the codebase.

Can I refactor existing Go test fakes to mockery mocks?

Refactoring existing Go test fakes to mockery mocks is supported by replacing manual fakes with mockery-generated repository mocks, integrating them into testify suite patterns to maintain consistent test quality.

Does unit-test-mockery-suite work for adding new tests to Go modules?

unit-test-mockery-suite works for adding new tests to Go modules by guiding teams through mock generation, suite-based structuring, and teardown verification for use-case logic and repository interfaces.

How do I run a focused testify test suite for a Go module?

Run a focused testify test suite for a Go module by executing the go test command with an appropriate -run filter, targeting specific suite tests that validate use-case logic with mockery mocks.