{"id":50757247,"url":"https://github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude","last_synced_at":"2026-06-11T06:03:15.632Z","repository":{"id":363503964,"uuid":"1222384301","full_name":"kevintsengtw/dotnet-testing-agent-orchestration-claude","owner":"kevintsengtw","description":".NET Testing Agent Orchestration for Claude Code","archived":false,"fork":false,"pushed_at":"2026-06-09T06:22:01.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-09T08:22:25.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevintsengtw.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T10:07:44.000Z","updated_at":"2026-06-09T06:22:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude","commit_stats":null,"previous_names":["kevintsengtw/dotnet-testing-agent-orchestration-claude"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kevintsengtw/dotnet-testing-agent-orchestration-claude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevintsengtw%2Fdotnet-testing-agent-orchestration-claude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevintsengtw%2Fdotnet-testing-agent-orchestration-claude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevintsengtw%2Fdotnet-testing-agent-orchestration-claude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevintsengtw%2Fdotnet-testing-agent-orchestration-claude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevintsengtw","download_url":"https://codeload.github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevintsengtw%2Fdotnet-testing-agent-orchestration-claude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34184780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-11T06:03:15.090Z","updated_at":"2026-06-11T06:03:15.618Z","avatar_url":"https://github.com/kevintsengtw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotnet-testing Agent Orchestration for Claude Code\n\n這個 repo 提供完整的 **Claude Code Subagents** .NET 測試工作流程範例，展示如何透過 Agent Orchestration 自動化完成四種測試類型：**Unit Testing**、**Integration Testing**、**Aspire Testing**、**TUnit Testing**。\n\n核心架構採用 **1+4 模型**：1 個 Orchestrator Skill 負責指揮 4 個專用 Subagent，依序完成 Analyzer → Writer → Executor → Reviewer 的完整測試流程——從分析目標程式碼、撰寫測試、執行驗證，到審查品質，全程自動化。\n\n本 repo 的目標讀者是使用 Claude Code 開發 .NET 專案的開發人員，提供可直接套用於實際專案的工作流程範例與練習素材。\n\n- [dotnet-testing Agent Orchestration for Claude Code](#dotnet-testing-agent-orchestration-for-claude-code)\n  - [架構概覽](#架構概覽)\n  - [系統需求](#系統需求)\n  - [安裝與環境設定](#安裝與環境設定)\n    - [一鍵安裝（推薦）](#一鍵安裝推薦)\n    - [步驟 1：Clone 儲存庫](#步驟-1clone-儲存庫)\n    - [步驟 2：安裝 Agent Skills](#步驟-2安裝-agent-skills)\n    - [步驟 3：確認完整 .claude/ 目錄結構](#步驟-3確認完整-claude-目錄結構)\n    - [步驟 4：安裝計時 Hook（可選）](#步驟-4安裝計時-hook可選)\n    - [步驟 5：驗證安裝](#步驟-5驗證安裝)\n  - [快速開始](#快速開始)\n  - [四種測試工作流程](#四種測試工作流程)\n  - [練習專案](#練習專案)\n  - [文件](#文件)\n\n---\n\n## 架構概覽\n\nOrchestrator Skill 接收使用者指令後，依序呼叫四個 Subagent：\n\n```text\nOrchestrator Skill\n    ├── Analyzer Subagent  （分析目標類別、依賴項、測試技術）\n    ├── Writer Subagent    （載入 Skills，產生測試程式碼）\n    ├── Executor Subagent  （建置並執行測試，處理修正迴圈）\n    └── Reviewer Subagent  （審查命名、斷言、覆蓋率、框架合規性）\n```\n\n每個階段必須依序完成，Reviewer 提出改善建議後，Orchestrator 會再次呼叫 Writer + Executor 進行修正。\n\n\u003e 詳細架構圖與各 Orchestrator 流程說明，請參閱 [docs/architecture/overview.md](docs/architecture/overview.md)\n\n---\n\n## 系統需求\n\n**必要：**\n\n| 工具                | 版本              | 說明                  |\n| ------------------- | ----------------- | --------------------- |\n| Claude Code CLI     | 最新版            | 必要                  |\n| .NET SDK            | 8.0 / 9.0 / 10.0 | 三個版本的練習專案     |\n| Node.js             | 最新版            | 用於安裝 Agent Skills |\n\n**整合測試 / Aspire 測試額外需要：**\n\n| 工具                    | 版本   | 說明                         |\n| ----------------------- | ------ | ---------------------------- |\n| Docker Desktop          | 最新版 | Testcontainers 容器執行環境  |\n| .NET Aspire workload    | 最新版 | Aspire 測試專用              |\n\n安裝 .NET Aspire workload：\n\n```bash\ndotnet workload install aspire\n```\n\n---\n\n## 安裝與環境設定\n\n### 一鍵安裝（推薦）\n\nClone 本 repo 後，從 repo 根目錄執行安裝指令碼，有兩種呼叫方式：\n\n#### 方式 A：指定目標專案的工作區路徑（在本 repo 內執行）\n\n```bash\ngit clone https://github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude.git\ncd dotnet-testing-agent-orchestration-claude\npython scripts/install-dotnet-testing-agents.py /path/to/your-project\n```\n\n#### 方式 B：切換到目標專案目錄後執行（目標預設為當前工作目錄）\n\n```bash\ngit clone https://github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude.git\ncd /path/to/your-project\npython /path/to/dotnet-testing-agent-orchestration-claude/scripts/install-dotnet-testing-agents.py\n```\n\n\u003e **注意：** 指令碼必須從本 repo 的 `scripts/` 目錄執行，或透過完整路徑呼叫。勿將 `install-dotnet-testing-agents.py` 單獨複製到目標專案執行，指令碼需要讀取本 repo 的 `.claude/` 來源目錄。\n\n指令碼會自動依序完成：複製 agents / hooks / skills（5 個）、從 GitHub 下載 Agent Skills（29+ 個）、執行 `install-hooks.js` 寫入 hooks 配置，並在結束後驗證安裝結果。\n\n**執行環境需求：** Python 3.8+、Node.js、網路連線。詳細說明請參閱 [scripts/README.md](scripts/README.md)。\n\n---\n\n### 步驟 1：Clone 儲存庫\n\n```bash\ngit clone https://github.com/kevintsengtw/dotnet-testing-agent-orchestration-claude.git\ncd dotnet-testing-agent-orchestration-claude\n```\n\n### 步驟 2：安裝 Agent Skills\n\nWriter Subagent 在撰寫測試時，需要載入各技術的 Skill 來確保輸出符合最佳實踐。這些 Agent Skills 由獨立 repo [`dotnet-testing-agent-skills`](https://github.com/kevintsengtw/dotnet-testing-agent-skills) 提供，需另行安裝到本 repo 的 `.claude/skills/` 目錄下。\n\n```bash\nnpx skills install dotnet-testing-agent-skills\n```\n\n安裝後，`.claude/skills/` 目錄下會新增以下 29 個 Agent Skill 目錄：\n\n```text\ndotnet-testing/\ndotnet-testing-advanced/\ndotnet-testing-advanced-aspire-testing/\ndotnet-testing-advanced-aspnet-integration-testing/\ndotnet-testing-advanced-testcontainers-database/\ndotnet-testing-advanced-testcontainers-nosql/\ndotnet-testing-advanced-tunit-advanced/\ndotnet-testing-advanced-tunit-fundamentals/\ndotnet-testing-advanced-webapi-integration-testing/\ndotnet-testing-advanced-xunit-upgrade-guide/\ndotnet-testing-autodata-xunit-integration/\ndotnet-testing-autofixture-basics/\ndotnet-testing-autofixture-bogus-integration/\ndotnet-testing-autofixture-customization/\ndotnet-testing-autofixture-nsubstitute-integration/\ndotnet-testing-awesome-assertions-guide/\ndotnet-testing-bogus-fake-data/\ndotnet-testing-code-coverage-analysis/\ndotnet-testing-complex-object-comparison/\ndotnet-testing-datetime-testing-timeprovider/\ndotnet-testing-filesystem-testing-abstractions/\ndotnet-testing-fluentvalidation-testing/\ndotnet-testing-nsubstitute-mocking/\ndotnet-testing-private-internal-testing/\ndotnet-testing-test-data-builder-pattern/\ndotnet-testing-test-naming-conventions/\ndotnet-testing-test-output-logging/\ndotnet-testing-unit-test-fundamentals/\ndotnet-testing-xunit-project-setup/\n```\n\n每個 Skill 目錄內含 `SKILL.md`（部分含 `references/` 與 `templates/` 子目錄）。\n\n### 步驟 3：確認完整 .claude/ 目錄結構\n\n完成步驟 1（Clone）與步驟 2（安裝 Agent Skills）後，`.claude/` 的完整預期結構如下：\n\n```text\n.claude/\n├── agents/                                                  ← 本 repo 內建（16 個）\n│   ├── dotnet-testing-analyzer.md                            Unit 組\n│   ├── dotnet-testing-writer.md\n│   ├── dotnet-testing-executor.md\n│   ├── dotnet-testing-reviewer.md\n│   ├── dotnet-testing-advanced-integration-analyzer.md       Integration 組\n│   ├── dotnet-testing-advanced-integration-writer.md\n│   ├── dotnet-testing-advanced-integration-executor.md\n│   ├── dotnet-testing-advanced-integration-reviewer.md\n│   ├── dotnet-testing-advanced-aspire-analyzer.md             Aspire 組\n│   ├── dotnet-testing-advanced-aspire-writer.md\n│   ├── dotnet-testing-advanced-aspire-executor.md\n│   ├── dotnet-testing-advanced-aspire-reviewer.md\n│   ├── dotnet-testing-advanced-tunit-analyzer.md              TUnit 組\n│   ├── dotnet-testing-advanced-tunit-writer.md\n│   ├── dotnet-testing-advanced-tunit-executor.md\n│   └── dotnet-testing-advanced-tunit-reviewer.md\n├── hooks/                                                   ← 本 repo 內建\n│   ├── dotnet-testing-agent-timer-pre.sh\n│   ├── dotnet-testing-agent-timer-post.sh\n│   └── install-hooks.js\n└── skills/\n    ├── dotnet-test/                                         ← 本 repo 內建（5 個）\n    ├── dotnet-testing-orchestrator-unit/\n    ├── dotnet-testing-orchestrator-integration/\n    ├── dotnet-testing-orchestrator-aspire/\n    ├── dotnet-testing-orchestrator-tunit/\n    │\n    ├── dotnet-testing/                                      ← Agent Skills（29 個）\n    ├── dotnet-testing-advanced/\n    ├── dotnet-testing-advanced-aspire-testing/\n    ├── dotnet-testing-advanced-aspnet-integration-testing/\n    ├── dotnet-testing-advanced-testcontainers-database/\n    ├── dotnet-testing-advanced-testcontainers-nosql/\n    ├── dotnet-testing-advanced-tunit-advanced/\n    ├── dotnet-testing-advanced-tunit-fundamentals/\n    ├── dotnet-testing-advanced-webapi-integration-testing/\n    ├── dotnet-testing-advanced-xunit-upgrade-guide/\n    ├── dotnet-testing-autodata-xunit-integration/\n    ├── dotnet-testing-autofixture-basics/\n    ├── dotnet-testing-autofixture-bogus-integration/\n    ├── dotnet-testing-autofixture-customization/\n    ├── dotnet-testing-autofixture-nsubstitute-integration/\n    ├── dotnet-testing-awesome-assertions-guide/\n    ├── dotnet-testing-bogus-fake-data/\n    ├── dotnet-testing-code-coverage-analysis/\n    ├── dotnet-testing-complex-object-comparison/\n    ├── dotnet-testing-datetime-testing-timeprovider/\n    ├── dotnet-testing-filesystem-testing-abstractions/\n    ├── dotnet-testing-fluentvalidation-testing/\n    ├── dotnet-testing-nsubstitute-mocking/\n    ├── dotnet-testing-private-internal-testing/\n    ├── dotnet-testing-test-data-builder-pattern/\n    ├── dotnet-testing-test-naming-conventions/\n    ├── dotnet-testing-test-output-logging/\n    ├── dotnet-testing-unit-test-fundamentals/\n    └── dotnet-testing-xunit-project-setup/\n```\n\n\u003e 安裝步驟 4（計時 Hook）完成後，會新增 `.claude/settings.json`。\n\n### 步驟 4：安裝計時 Hook（可選）\n\n```bash\nnode .claude/hooks/install-hooks.js\n```\n\nHook 會自動記錄每個 Subagent 的執行耗時，執行後設定寫入 `.claude/settings.json`。未安裝時 Orchestrator 仍可正常運作，只是不會顯示耗時資訊。\n\n### 步驟 5：驗證安裝\n\n在 Claude Code 中輸入以下任一指令，確認斜線指令可用：\n\n```text\n/dotnet-testing-orchestrator-unit\n/dotnet-testing-orchestrator-integration\n/dotnet-testing-orchestrator-aspire\n/dotnet-testing-orchestrator-tunit\n```\n\n\u003e 完整安裝說明與常見問題排查，請參閱 [docs/SETUP.md](docs/SETUP.md)\n\n---\n\n## 快速開始\n\n在 Claude Code 內輸入對應指令，並提供目標資訊即可啟動工作流程。\n\n**單元測試：**\n\n```text\n/dotnet-testing-orchestrator-unit\n\n目標：src/Services/OrderService.cs\n說明：訂單服務，依賴 IOrderRepository 和 INotificationService\n```\n\n**整合測試：**\n\n```text\n/dotnet-testing-orchestrator-integration\n\n目標：Controllers/OrdersController.cs\n資料庫：PostgreSQL\n說明：訂單 CRUD API 整合測試\n```\n\n**Aspire 測試：**\n\n```text\n/dotnet-testing-orchestrator-aspire\n\n目標：AppHost/AppHost.csproj\n說明：電商平台的 Aspire 分散式應用整合測試\n```\n\n**TUnit 測試：**\n\n```text\n/dotnet-testing-orchestrator-tunit\n\n目標：src/Services/CalculationService.cs\n說明：純函式計算服務，使用 TUnit 框架\n```\n\n---\n\n## 四種測試工作流程\n\n| 工作流程 | 觸發指令 | 適用場景 | 必要環境 | 詳細說明 |\n|---------|---------|---------|---------|---------|\n| 單元測試 | `/dotnet-testing-orchestrator-unit` | xUnit + Mock + AutoFixture | .NET SDK | [使用指南](docs/guides/unit-testing.md) |\n| 整合測試 | `/dotnet-testing-orchestrator-integration` | WebAPI + Testcontainers | .NET SDK + Docker | [使用指南](docs/guides/integration-testing.md) |\n| Aspire 測試 | `/dotnet-testing-orchestrator-aspire` | 分散式應用 | .NET SDK + Docker + Aspire | [使用指南](docs/guides/aspire-testing.md) |\n| TUnit 測試 | `/dotnet-testing-orchestrator-tunit` | TUnit 框架 / xUnit 遷移 | .NET SDK | [使用指南](docs/guides/tunit-testing.md) |\n\n---\n\n## 練習專案\n\n每組練習專案皆提供 net8.0 / net9.0 / net10.0 三個版本。\n\n| 測試類型    | 目錄                                        | 支援版本                  | 說明         |\n| ----------- | ------------------------------------------- | ------------------------- | ------------ |\n| 單元測試    | `samples/unit/practice/`                    | net8.0 / net9.0 / net10.0 | 6 個學習階段 |\n| 整合測試    | `samples/integration/practice_integration/` | net8.0 / net9.0 / net10.0 | 5 個驗證情境 |\n| Aspire 測試 | `samples/aspire/practice_aspire/`           | net8.0 / net9.0 / net10.0 | 4 個驗證階段 |\n| TUnit 測試  | `samples/tunit/practice_tunit/`             | net8.0 / net9.0 / net10.0 | 5 個學習階段 |\n\n\u003e **注意：** `samples/*/tests/` 目錄下的測試專案為初始空白狀態，由 Orchestrator 工作流程產生內容。工作流程執行過程中產生的測試類別檔案與 `.csproj` 修改**不得 commit 或推送至遠端**，以維持練習環境的初始狀態。\n\n---\n\n## 文件\n\n\u003e 完整文件請參閱 [docs/README.md](docs/README.md)\n\n- 一鍵安裝指令碼：[scripts/README.md](scripts/README.md)\n- 安裝說明：[docs/SETUP.md](docs/SETUP.md)\n- 架構總覽：[docs/architecture/overview.md](docs/architecture/overview.md)\n- 使用指南：[docs/guides/](docs/guides/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevintsengtw%2Fdotnet-testing-agent-orchestration-claude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevintsengtw%2Fdotnet-testing-agent-orchestration-claude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevintsengtw%2Fdotnet-testing-agent-orchestration-claude/lists"}