test
Skill0 starsChanged 7 months agoMITView on GitHub
TestContainers·Mockito·슬라이스 테스트·커버리지 전략. Mock vs 실제 의존성 결정 시 사용.
98 other projects use a version of this.
Adopted by
Most recently taken up by
- Kangentic/kangentictheir own version, first seen Oct 5, 2026
- crbnos/carbontheir own version, first seen Oct 4, 2026
- vericontext/vibeframetheir own version, first seen Oct 4, 2026
- thekinv21/NotificationServicetheir own version, first seen Oct 3, 2026
- domengabrovsek/agent-configtheir own version, first seen Oct 2, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
Used with
Projects with it also use develop, document and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
bamechoSkilldevelop
开发实施阶段详细规则;进入开发实施时读取;包含执行流程、代码规范、一致性审计、方案包迁移
Also in 6 projects that use this
nicolasestremSkilldocument
Create focused documentation for specific components or features
Also in 8 projects that use this
BugRogerSkillproject
Project lifecycle management. Dispatches to Ada.
Also in 6 projects that use this
vltingSkillscope
Interactive planning + orchestration. Approval-gated workflow covering saga→epic→task hierarchy via progressive scoping.
Also in 5 projects that use this
bitwize-music-studioSkilltutorial
Provides interactive guided album creation for new users. Use when the user is new to the plugin or asks for a walkthrough of the album creation process.
Also in 3 projects that use this
kt057Skillcheck
lint, typecheck, test を一括実行して結果をサマリーする
Also in 8 projects that use this
Other versions98 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 98
- NVIDIA/TensorRT★ 13ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- crbnos/carbon★ 2.7ksame name
- jsmastery-pro/skills★ 1.4ksame name
- getsentry/sentry-java★ 1.4ksame name
- bitwize-music-studio/claude-ai-music-skills★ 531same name
- boshu2/agentops★ 447same name
- platformplatform/PlatformPlatform★ 440same name
- owainlewis/blueprint★ 410same name
- OyadotAI/oya-browser★ 350same name
88 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- bstackSkill
- api-reviewSkill
- arch-guardSkill
- architectSkill
- auditSkill
- brainstormingSkill
- collaborationSkill
- conventionsSkill
- investigateSkill
- metricsSkill
- observabilitySkill
- perfSkill
- persistenceSkill
- securitySkill
- shipSkill
- specSkill
- spring-coreSkill
- subagent-drivenSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
/test — 테스트 전략 스킬
TestContainers, Mockito, 슬라이스 테스트, 커버리지 전략을 다룬다.
When to use
- 테스트 전략 수립 (단위 vs 통합)
- TestContainers 설정
- Mockito vs 실제 의존성 판단
- 커버리지 80%+ 달성 전략
- 슬라이스 테스트 (
@WebMvcTest,@DataJpaTest)
핵심 원칙: 무엇을 Mock하고 무엇을 실제로 쓸까
| 의존성 | 권장 방식 | 이유 |
| 데이터베이스 | TestContainers (실제) | Mock/실제 불일치로 프로덕션 버그 발생 |
| 외부 HTTP API | WireMock (Mock) | 외부 서비스 불안정성 격리 |
| 이메일/SMS | Mock | 실제 발송 방지 |
| 파일 시스템 | 임시 디렉터리 | 테스트 격리 |
| 메시지 브로커 | TestContainers (실제) | 메시지 순서/트랜잭션 검증 필요 |
TestContainers 설정
@SpringBootTest
@Testcontainers
class OrderServiceIntegrationTest {
@Container
static MySQLContainer<?> mysql = new MySQLContainer<>("mysql:8.4")
.withDatabaseName("testdb")
.withUsername("test")
.withPassword("test");
@DynamicPropertySource
static void configureProperties(DynamicPropertyRegistry registry) {
registry.add("spring.datasource.url", mysql::getJdbcUrl);
registry.add("spring.datasource.username", mysql::getUsername);
registry.add("spring.datasource.password", mysql::getPassword);
}
@Test
void 주문_생성_성공() {
// given / when / then
}
}슬라이스 테스트
// Controller 레이어만 (빠름)
@WebMvcTest(OrderController.class)
class OrderControllerTest {
@Autowired MockMvc mockMvc;
@MockBean OrderService orderService; // Service는 Mock
@Test
void 주문_조회_200() throws Exception {
given(orderService.getOrder(1L)).willReturn(sampleOrder());
mockMvc.perform(get("/api/v1/orders/1"))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id").value(1));
}
}
// Repository 레이어만
@DataJpaTest
@AutoConfigureTestDatabase(replace = NONE) // TestContainers 사용 시
class OrderRepositoryTest {
@Autowired OrderRepository repository;
}Context Rot 방지 (테스트 출력)
// application-test.yml
logging:
level:
org.hibernate.SQL: OFF # 성공 시 SQL 로그 끄기
org.testcontainers: WARN # 컨테이너 시작 로그 최소화테스트 실행 후:
- 성공:
Tests: 42 passed(한 줄) - 실패: 실패 케이스 스택트레이스 전체 출력
커버리지 전략
<!-- pom.xml JaCoCo 설정 -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*Request.class</exclude>
<exclude>**/*Response.class</exclude>
<exclude>**/config/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals><goal>check</goal></goals>
<configuration>
<rules>
<rule>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.80</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>테스트 명명 규칙
// 한국어 설명 또는 영어 given_when_then
@Test
void 재고_부족_시_주문_생성_실패() { ... }
@Test
void createOrder_whenStockInsufficient_throwsException() { ... }References
- docs/STYLE_GUIDE.md — 원칙 (Karpathy 4 + 동료 협업 + 정량)
- docs/RED_FLAGS.md — 안티패턴
- docs/LAYER_RULES.md — 레이어 규칙
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

