allcll-testing

Guide unit, integration, and WebMvcTest creation with AssertJ and @MockitoBean conventions.

26|1|Updated Jan 8, 2025
One-click install
npx skills add https://github.com/allcll/allcll-backend --skill allcll-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: allcll-testing
Source: https://github.com/allcll/allcll-backend/tree/main/.agents/skills/testing
Command: npx skills add https://github.com/allcll/allcll-backend --skill allcll-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

이 Skill은 테스트 작성·수정 작업에서 어떤 방식으로 테스트를 선택하고, 어떤 컨벤션으로 구현해야 하는지 빠르게 정리해 줍니다. 통합 테스트와 단위 테스트 사이의 판단, 그리고 프로젝트의 테스트 스타일 일관성을 유지하는 데 도움을 줍니다.

Core Features & Use Cases

  • 테스트 유형 가이드: 단위 테스트, 통합 테스트, WebMvcTest 중 무엇을 써야 하는지 판단합니다.
  • 프로젝트 컨벤션 준수: AssertJ, @MockitoBean, Fixture 정적 import 규칙을 따르도록 돕습니다.
  • 실무 적용: 테스트를 새로 만들거나 기존 테스트를 수정할 때, 코드 작성 전에 기준을 먼저 정리하는 용도로 사용합니다.

Quick Start

allcll-testing 스킬을 사용해 현재 변경하려는 기능에 맞는 테스트 전략과 구현 방향을 먼저 정리해 줘.

Frequently Asked Questions about allcll-testing

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

FAQPage Schema
How do I decide between a unit test and an integration test for a new Spring feature?

To decide between a unit test and an integration test, evaluate the test scope and consistency requirements for your application. This guides you to select the correct test type based on the specific component boundaries and needed coverage.

How do I write a WebMvcTest using AssertJ and @MockitoBean conventions?

Writing a WebMvcTest with AssertJ and @MockitoBean involves applying fixture static imports and adhering to deterministic test design. This ensures your controller tests remain isolated, consistent with project standards, and focused on web layer interactions.

When should I use @MockitoBean instead of standard Mockito mocks in my tests?

You should use @MockitoBean instead of standard Mockito mocks when following a strict project testing convention that requires specific fixture import rules. This approach supports deterministic test design and maintains consistency across integration and unit test scopes.

What is the best way to refactor existing tests to follow a consistent testing convention?

The best way to refactor tests for consistent convention is to re-evaluate test scope selection and apply AssertJ, @MockitoBean, and fixture import rules. This aligns existing tests with project standards for deterministic test design.

Does this testing convention support deterministic test design for WebMvcTest scenarios?

Yes, this testing convention supports deterministic test design for WebMvcTest scenarios. It guides test scope selection and mandates specific fixtures and mocking rules, ensuring that web layer tests produce reliable and repeatable results.