소스 정보
- 저장소
- ForceInjection/domain-driven-design-skills
- 최근 소스 활동
- 2026년 5월 8일 03:07
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 25
- 포크
- 7
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill test-dev명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | test-dev |
| description | 测试开发专家,基于JUnit 5 + AssertJ + Mockito + JaCoCo的标准化测试规范。 |
| version | v1.0 |
| tags | ["testing","junit5","assertj","mockito","jacoco","coverage"] |
| allowed-tools | Read, Write, Edit, Bash |
| requires-skills | [] |
单一职责: 标准化测试框架 - JUnit 5 + AssertJ + Mockito + JaCoCo
<junit.version>5.11.3</junit.version>
<assertj.version>3.27.0</assertj.version>
<mockito.version>5.8.0</mockito.version>
<jacoco.version>0.8.12</jacoco.version>
| 模块 | 行覆盖率 | 分支覆盖率 |
|---|---|---|
| 核心引擎 | ≥90% | ≥85% |
| 指令实现 | ≥95% | ≥90% |
| 总体 | ≥85% | ≥80% |
格式: test{场景}_{期望结果}_when{条件}
// ✅ 好示例
void testIAddReturnsSum_whenStackHasTwoIntegers() { }
void testTypeCheckerRejectsInvalidBinaryOp_whenOperandsIncompatible() { }
// ❌ 差示例
void test1() { }
void testMethod() { }
@Test
@DisplayName("应正确执行 IADD 指令")
void testIAddInstruction() {
// Given - 准备测试数据
OperandStack stack = new OperandStack(10);
stack.push(10);
stack.push(20);
// When - 执行被测操作
instruction.execute(context);
// Then - 验证结果
assertThat(stack.pop()).isEqualTo(30);
}
// ✅ 推荐: AssertJ流畅断言
assertThat(result)
.isNotNull()
.isEqualTo(expected);
assertThat(list)
.isNotEmpty()
.hasSize(3);
// ❌ 避免: JUnit旧式断言
assertEquals(expected, result); // 顺序易错
@Tag("unit")
class InstructionTest {
@Test
@DisplayName("加法指令应正确计算")
void testAdd() {
// Given
AddInstruction add = new AddInstruction();
// When
add.execute(context);
// Then
assertThat(result).isEqualTo(8);
}
}
@Tag("integration")
class CompilerPipelineTest {
@Test
@DisplayName("完整编译流程应处理循环")
void testFullCompilation() {
// Given
String source = loadTestProgram("fibonacci.cymbol");
// When
CompilationResult result = compiler.compile(source);
// Then
assertThat(result.isSuccess()).isTrue();
}
}
@ParameterizedTest
@ValueSource(ints = {0, 1, 10, 100})
@DisplayName("数据栈应处理各种值")
void testStackPushPop(int value) {
stack.push(value);
assertThat(stack.pop()).isEqualTo(value);
}
# 运行测试
mvn test # 全部测试
mvn test -pl ep21 # 特定模块
mvn test -Dtest="*Optimizer*" # 特定测试
# 覆盖率
mvn jacoco:report # 生成报告
open ep21/target/site/jacoco/index.html # 查看报告
mvn jacoco:check # 检查覆盖率
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 测试独立失败 | 共享静态状态 | 使用@BeforeEach初始化 |
| 测试有逻辑 | if/else分支 | 拆分成多个测试 |
| 覆盖率不足 | 缺少边界测试 | 添加边界条件测试 |
版本: v1.0 | 垂直职责: 测试开发 | 2025-12-23