test
Skill0 starsChanged 7 months agoMITView on GitHub
TestContainers·Mockito·슬라이스 테스트·커버리지 전략. Mock vs 실제 의존성 결정 시 사용.
179 other projects use a version of this.
Adopted by
Most recently taken up by
- tyrantpiper/travel-pwatheir own version, first seen Nov 8, 2026
- phuthuycoding/kanban-flowtheir own version, first seen Nov 8, 2026
- pche-broken-artist/forge-of-thoughttheir own version, first seen Nov 8, 2026
- PMDevSolutions/Flaviantheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use agent-context-isolation, agentica-infrastructure and 10 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.
parcadeiSkillagent-context-isolation
Agent Context Isolation
Also in 3 projects that use this
parcadeiSkillagentica-infrastructure
Reference guide for Agentica multi-agent infrastructure APIs
Also in 3 projects that use this
- +10 more from parcadei
Other versions179 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 179
- react/react★ 252ksame name
- facebook/react★ 252ksame name
- apache/skywalking★ 25ksame name
- livewire/livewire★ 24ksame name
- NVIDIA/TensorRT★ 13ksame name
- FalkorDB/FalkorDB★ 10ksame name
- FastLED/FastLED★ 7.5ksame name
- fleetdm/fleet★ 7.2ksame name
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
169 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.

