{"id":"3045b9fc-081a-420c-994b-ded3d9b948e7","shortId":"cKn8cc","kind":"skill","title":"dotnet-testing-code-coverage-analysis","tagline":"程式碼覆蓋率分析完整指南。當需要分析程式碼覆蓋率、產生覆蓋率報告或設定 CI/CD 覆蓋率檢查時使用。涵蓋 Coverlet 設定、報告產生、指標解讀與循環複雜度整合。包含 Fine Code Coverage、VS Code 內建工具與最佳實踐。\nMake sure to use this skill whenever the user mentions code coverage, Coverlet, coverage report, branch coverage, cyclomatic complexity, or test quality me","description":"# 程式碼覆蓋率分析指南\n\n## Code Coverage 核心概念\n\n**程式碼覆蓋率 (Code Coverage)** 是一種測量指標，用來統計測試執行時實際執行了多少程式碼。\n\n**實際價值：** 找出測試盲點、評估測試完整性、輔助重構決策、增加測試信心。\n\n**常見誤解：**\n\n- 涵蓋率 100% 不代表沒有 Bug — 只代表程式碼有被執行，不代表驗證了正確行為\n- 涵蓋率數字越高不一定越好 — 重點是測試的有效性\n- 把涵蓋率當作 KPI 會適得其反 — 開發者會為了衝數字而寫沒有 Assert 的測試\n\n## 覆蓋率工具選擇\n\n| 工具                         | 優點                           | 適用場景       |\n| ---------------------------- | ------------------------------ | -------------- |\n| Visual Studio Enterprise     | 內建整合，完整 UI              | 僅 Enterprise  |\n| Fine Code Coverage（推薦）   | 免費，即時顯示，編輯器直接標示 | VS 所有版本    |\n| .NET CLI + Coverlet          | 跨平台，CLI 自動化             | CI/CD 流程     |\n| VS Code 內建                 | 跨平台，無需額外擴充套件       | VS Code 開發   |\n\n### Fine Code Coverage 設定\n\n- **安裝方式：** Visual Studio 延伸模組管理 → 搜尋 \"Fine Code Coverage\" → 安裝\n- **必要設定：** 工具 → 選項 → Fine Code Coverage → Enable: `True`、Editor Colouring Line Highlighting: `True`\n\n### VS Code 內建測試覆蓋率\n\n1. 安裝 C# Dev Kit 擴充套件\n2. 開啟測試總管（燒杯圖示）\n3. 點選「執行涵蓋範圍測試」\n4. 查看結果：測試涵蓋範圍視圖、編輯器內顯示、檔案總管顯示\n\n## 執行覆蓋率分析\n\n```powershell\n# .NET CLI（推薦用於 CI/CD）\ndotnet test --collect:\"XPlat Code Coverage\"\ndotnet test --collect:\"XPlat Code Coverage\" --results-directory ./coverage\n\n# Fine Code Coverage：在 VS 中執行測試後自動顯示\n# VS Code：開啟測試總管 → 點選「執行涵蓋範圍測試」\n```\n\n### 方法說明\n\n| 方法              | 工具                  | 操作步驟                                      |\n| ----------------- | --------------------- | --------------------------------------------- |\n| .NET CLI          | Coverlet + CLI        | 執行 `dotnet test --collect:\"XPlat Code Coverage\"` |\n| Fine Code Coverage | VS 擴充套件          | 在 VS 中執行測試後自動顯示                    |\n| VS Code           | C# Dev Kit            | 開啟測試總管 → 執行涵蓋範圍測試               |\n\n## 設定 Coverlet\n\n測試專案需安裝 `coverlet.collector` 套件，並可透過 `runsettings` 檔案進行進階設定（排除規則、閾值、報告格式）。\n\n> 完整 csproj 配置範例請參考 [references/coverlet-csproj-config.md](references/coverlet-csproj-config.md)\n\n## 解讀覆蓋率報告\n\n**顏色標示：** 綠色（已覆蓋）、黃色（部分覆蓋）、紅色（未覆蓋）\n\n**覆蓋率指標：**\n\n1. **Line Coverage（行覆蓋率）** — 被執行的行數 / 總行數，最基本的指標\n2. **Branch Coverage（分支覆蓋率）** — 被執行的分支數 / 總分支數，比行覆蓋率更準確\n3. **Method Coverage（方法覆蓋率）** — 被執行的方法數 / 總方法數\n\n**報告解讀策略：** 優先處理紅色區域（完全未測試）→ 檢查黃色區域（部分分支未測試）→ 評估必要性（簡單 getter/setter 可跳過）\n\n## 結合複雜度指標\n\n循環複雜度（Cyclomatic Complexity）代表程式中獨立邏輯路徑的數量，等於至少需要的測試案例數量。每個 if、for、while、case、&&、|| 都會增加複雜度。\n\n**Visual Studio 擴充套件：**\n\n- **CodeMaintainability** — 顯示可維護性指標、計算循環複雜度\n- **CodeMaid** — Spade 功能視覺化程式碼結構、顯示每個方法的複雜度\n\n> 完整範例與測試策略請參考 [references/cyclomatic-complexity-example.md](references/cyclomatic-complexity-example.md)\n\n## 改善覆蓋率的策略\n\n**漸進式改善流程：**\n\n1. 第一階段：覆蓋核心業務邏輯（目標 60-70%）\n2. 第二階段：補充邊界條件測試（目標 70-80%）\n3. 第三階段：處理異常情境（目標 80-85%）\n4. 維持階段：新增功能必須有測試\n\n**優先順序：**\n\n- **高優先級**：業務邏輯核心、金融計算、資料驗證、權限控制、異常處理\n- **中優先級**：資料轉換、格式化邏輯、查詢邏輯\n- **低優先級**：簡單 getter/setter、DTO 類別、自動產生的程式碼\n\n**排除不必要的程式碼：** 使用 `[ExcludeFromCodeCoverage]` 屬性或在 runsettings 中排除。\n\n## 最佳實踐\n\n### 測試案例數量決策\n\n1. **基於需求分析** — 列出使用案例、識別邊界條件和異常情況\n2. **參考複雜度指標** — 循環複雜度提供測試案例下限\n3. **平衡覆蓋率與品質** — 不以 100% 覆蓋率為唯一目標，專注於關鍵業務邏輯\n\n### 四大測試類型\n\n1. **邊界測試**：測試輸入值的上下限\n2. **異常測試**：驗證錯誤處理邏輯\n3. **主流程測試**：覆蓋正常的業務流程\n4. **條件分支測試**：確保所有分支都有測試\n\n### 持續改善\n\n- 每次提交前檢查涵蓋率變化，Pull Request 時審查覆蓋率\n- 關注未覆蓋的關鍵程式碼，優先處理高複雜度未測試區域\n- 新功能必須包含測試，Code Review 包含測試檢查\n\n## CI/CD 整合\n\n覆蓋率分析可整合至 CI/CD Pipeline，在 GitHub Actions 中使用 `dotnet test --collect:\"XPlat Code Coverage\"` 搭配 `reportgenerator` 產生報告；在 Azure DevOps 中使用 `DotNetCoreCLI@2` 任務搭配 `PublishCodeCoverageResults@1`。\n\n> 完整 YAML 設定範例請參閱 [references/cicd-integration.md](references/cicd-integration.md)\n\n## 常見問題與解決方案\n\n### Q1: 覆蓋率顯示 0%？\n\n1. 確認已安裝 `coverlet.collector` 套件\n2. 檢查 runsettings 設定是否正確\n3. 確認測試有實際執行\n4. 查看是否有排除設定過於廣泛\n\n### Q2: Visual Studio 看不到覆蓋率？\n\n- Community/Professional 版本：安裝 Fine Code Coverage 擴充套件\n- Enterprise 版本：使用內建功能\n- 確認已啟用覆蓋率收集\n\n### Q3: VS Code 無法顯示覆蓋率？\n\n1. 確認已安裝 C# Dev Kit\n2. 重新執行「執行涵蓋範圍測試」\n3. 檢查 lcov 檔案是否產生\n4. 嘗試重新載入視窗\n\n### Q4: 如何提升覆蓋率？\n\n1. 識別未覆蓋的關鍵程式碼（紅色區域）\n2. 補充邊界條件測試\n3. 測試所有條件分支\n4. 加入異常情境測試\n5. 考慮重構過於複雜的方法\n\n## 檢查清單\n\n- [ ] 已安裝 `coverlet.collector` 套件\n- [ ] 可以執行 `dotnet test --collect:\"XPlat Code Coverage\"`\n- [ ] 工具可以正常顯示覆蓋率結果\n- [ ] 了解覆蓋率數字的真正意義（不是 KPI）\n- [ ] 已排除不必要的程式碼\n- [ ] 專注於測試品質而非覆蓋率數字\n\n## 範本檔案\n\n- `templates/runsettings-template.xml` - 覆蓋率設定範本\n- `templates/coverage-workflow.md` - 完整的工作流程說明\n\n## 核心理念\n\n> **程式碼覆蓋率是手段，不是目的。** 重點在於關鍵業務邏輯是否都有測試、測試是否真正驗證了預期行為、是否能在重構時提供信心。\n\n## 輸出格式\n\n- 產生 `coverage.runsettings` 設定檔，配置覆蓋率收集參數與排除規則\n- 修改測試專案 `.csproj`，確保包含 `coverlet.collector` 套件參考\n- 產生覆蓋率報告（cobertura XML 格式），可供 CI/CD 管線使用\n- 提供覆蓋率分析摘要，標示未覆蓋的關鍵區域與改善建議\n\n## 參考資源\n\n### 原始文章\n\n- **Day 06 - Code Coverage 程式碼涵蓋範圍實戰指南**\n  - 鐵人賽文章：https://ithelp.ithome.com.tw/articles/10374467\n\n### 官方文件\n\n- [使用程式碼涵蓋範圍進行單元測試](https://learn.microsoft.com/dotnet/core/testing/unit-testing-code-coverage)\n- [dotnet-coverage 工具](https://learn.microsoft.com/dotnet/core/additional-tools/dotnet-coverage)\n- [VS Code Testing](https://code.visualstudio.com/docs/editor/testing)\n\n### 工具\n\n- [Fine Code Coverage](https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage2022)\n- [Coverlet](https://github.com/coverlet-coverage/coverlet)\n- [ReportGenerator](https://github.com/danielpalme/ReportGenerator)\n\n### 相關技能\n\n- `unit-test-fundamentals` - 單元測試基礎與 FIRST 原則\n- `xunit-project-setup` - xUnit 專案設定","tags":["dotnet","testing","code","coverage","analysis","agent","skills","kevintsengtw","agent-skills","ai-assisted-development","copilot-skills","csharp"],"capabilities":["skill","source-kevintsengtw","skill-dotnet-testing-code-coverage-analysis","topic-agent-skills","topic-ai-assisted-development","topic-copilot-skills","topic-csharp","topic-dotnet","topic-dotnet-testing","topic-github-copilot","topic-integration-testing","topic-testing","topic-unit-testing","topic-xunit"],"categories":["dotnet-testing-agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-code-coverage-analysis","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add kevintsengtw/dotnet-testing-agent-skills","source_repo":"https://github.com/kevintsengtw/dotnet-testing-agent-skills","install_from":"skills.sh"}},"qualityScore":"0.461","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 23 github stars · SKILL.md body (5,171 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-24T13:02:26.631Z","embedding":null,"createdAt":"2026-04-18T23:04:27.953Z","updatedAt":"2026-04-24T13:02:26.631Z","lastSeenAt":"2026-04-24T13:02:26.631Z","tsv":"'-70':308 '-80':314 '-85':320 '/articles/10374467':537 '/coverage':180 '/coverlet-coverage/coverlet)':566 '/danielpalme/reportgenerator)':570 '/docs/editor/testing)':555 '/dotnet/core/additional-tools/dotnet-coverage)':549 '/dotnet/core/testing/unit-testing-code-coverage)':542 '/items?itemname=fortunengwenya.finecodecoverage2022)':562 '0':421 '06':530 '1':142,247,303,349,363,412,422,453,469 '100':63,359 '2':148,254,309,353,366,409,426,458,472 '3':151,261,315,356,369,430,461,474 '4':154,321,372,432,465,476 '5':478 '60':307 '70':313 '80':319 'action':393 'analysi':6 'assert':74 'azur':405 'branch':39,255 'bug':65 'c':144,217,455 'case':286 'ci/cd':10,103,164,386,389,523 'cli':98,101,162,197,199 'cobertura':519 'code':4,19,22,34,48,52,89,106,111,114,123,130,140,169,175,182,188,205,208,216,383,399,442,451,489,531,551,558 'code.visualstudio.com':554 'code.visualstudio.com/docs/editor/testing)':553 'codemaid':294 'codemaintain':291 'collect':167,173,203,397,487 'colour':135 'community/professional':438 'complex':42,279 'coverag':5,20,35,37,40,49,53,90,115,124,131,170,176,183,206,209,249,256,263,400,443,490,532,545,559 'coverage.runsettings':510 'coverlet':13,36,99,198,223,563 'coverlet.collector':225,424,482,516 'csproj':234,514 'cyclomat':41,278 'day':529 'dev':145,218,456 'devop':406 'directori':179 'dotnet':2,165,171,201,395,485,544 'dotnet-coverag':543 'dotnet-testing-code-coverage-analysi':1 'dotnetcorec':408 'dto':338 'editor':134 'enabl':132 'enterpris':82,87,445 'excludefromcodecoverag':343 'fine':18,88,113,122,129,181,207,441,557 'first':577 'fundament':575 'getter/setter':274,337 'github':392 'github.com':565,569 'github.com/coverlet-coverage/coverlet)':564 'github.com/danielpalme/reportgenerator)':568 'highlight':137 'ithelp.ithome.com.tw':536 'ithelp.ithome.com.tw/articles/10374467':535 'kit':146,219,457 'kpi':71,494 'lcov':463 'learn.microsoft.com':541,548 'learn.microsoft.com/dotnet/core/additional-tools/dotnet-coverage)':547 'learn.microsoft.com/dotnet/core/testing/unit-testing-code-coverage)':540 'line':136,248 'make':24 'marketplace.visualstudio.com':561 'marketplace.visualstudio.com/items?itemname=fortunengwenya.finecodecoverage2022)':560 'mention':33 'method':262 'net':97,161,196 'pipelin':390 'powershel':160 'project':581 'publishcodecoverageresult':411 'pull':377 'q1':419 'q2':434 'q3':449 'q4':467 'qualiti':45 'references/cicd-integration.md':416,417 'references/coverlet-csproj-config.md':236,237 'references/cyclomatic-complexity-example.md':299,300 'report':38 'reportgener':402,567 'request':378 'result':178 'results-directori':177 'review':384 'runset':228,345,428 'setup':582 'skill':29 'skill-dotnet-testing-code-coverage-analysis' 'source-kevintsengtw' 'spade':295 'studio':81,119,289,436 'sure':25 'templates/coverage-workflow.md':500 'templates/runsettings-template.xml':498 'test':3,44,166,172,202,396,486,552,574 'topic-agent-skills' 'topic-ai-assisted-development' 'topic-copilot-skills' 'topic-csharp' 'topic-dotnet' 'topic-dotnet-testing' 'topic-github-copilot' 'topic-integration-testing' 'topic-testing' 'topic-unit-testing' 'topic-xunit' 'true':133,138 'ui':85 'unit':573 'unit-test-fundament':572 'use':27 'user':32 'visual':80,118,288,435 'vs':21,95,105,110,139,185,187,210,213,215,450,550 'whenev':30 'xml':520 'xplat':168,174,204,398,488 'xunit':580,583 'xunit-project-setup':579 'yaml':414 '不代表沒有':64 '不代表驗證了正確行為':67 '不以':358 '不是':493 '不是目的':504 '並可透過':227 '中使用':394,407 '中優先級':331 '中執行測試後自動顯示':186,214 '中排除':346 '主流程測試':370 '了解覆蓋率數字的真正意義':492 '代表程式中獨立邏輯路徑的數量':280 '任務搭配':410 '低優先級':335 '使用':342 '使用內建功能':447 '使用程式碼涵蓋範圍進行單元測試':539 '修改測試專案':513 '僅':86 '優先處理紅色區域':268 '優先處理高複雜度未測試區域':381 '優先順序':324 '優點':78 '免費':92 '內建':107 '內建工具與最佳實踐':23 '內建整合':83 '內建測試覆蓋率':141 '分支覆蓋率':257 '列出使用案例':351 '功能視覺化程式碼結構':296 '加入異常情境測試':477 '包含':17 '包含測試檢查':385 '即時顯示':93 '原則':578 '原始文章':528 '參考複雜度指標':354 '參考資源':527 '只代表程式碼有被執行':66 '可以執行':484 '可供':522 '可跳過':275 '單元測試基礎與':576 '嘗試重新載入視窗':466 '四大測試類型':362 '在':184,212,391,404 '執行':200 '執行涵蓋範圍測試':153,191,221,460 '執行覆蓋率分析':159 '基於需求分析':350 '報告格式':232 '報告產生':15 '報告解讀策略':267 '增加測試信心':60 '套件':226,425,483 '套件參考':517 '如何提升覆蓋率':468 '安裝':125,143,440 '安裝方式':117 '完全未測試':269 '完整':84,233,413 '完整的工作流程說明':501 '完整範例與測試策略請參考':298 '官方文件':538 '實際價值':56 '專案設定':584 '專注於測試品質而非覆蓋率數字':496 '專注於關鍵業務邏輯':361 '屬性或在':344 '工具':77,127,194,546,556 '工具可以正常顯示覆蓋率結果':491 '已安裝':481 '已排除不必要的程式碼':495 '已覆蓋':241 '常見問題與解決方案':418 '常見誤解':61 '平衡覆蓋率與品質':357 '延伸模組管理':120 '循環複雜度':277 '循環複雜度提供測試案例下限':355 '必要設定':126 '所有版本':96 '找出測試盲點':57 '把涵蓋率當作':70 '持續改善':375 '指標解讀與循環複雜度整合':16 '排除不必要的程式碼':341 '排除規則':230 '推薦':91 '推薦用於':163 '提供覆蓋率分析摘要':525 '搜尋':121 '搭配':401 '操作步驟':195 '擴充套件':147,211,290,444 '改善覆蓋率的策略':301 '整合':387 '新功能必須包含測試':382 '新增功能必須有測試':323 '方法':193 '方法覆蓋率':264 '方法說明':192 '是一種測量指標':54 '是否能在重構時提供信心':507 '時審查覆蓋率':379 '最佳實踐':347 '最基本的指標':253 '會適得其反':72 '未覆蓋':245 '查看是否有排除設定過於廣泛':433 '查看結果':155 '查詢邏輯':334 '核心概念':50 '核心理念':502 '格式':521 '格式化邏輯':333 '條件分支測試':373 '業務邏輯核心':326 '標示未覆蓋的關鍵區域與改善建議':526 '檔案是否產生':464 '檔案總管顯示':158 '檔案進行進階設定':229 '檢查':427,462 '檢查清單':480 '檢查黃色區域':270 '權限控制':329 '每個':282 '每次提交前檢查涵蓋率變化':376 '比行覆蓋率更準確':260 '流程':104 '涵蓋':12 '涵蓋率':62 '涵蓋率數字越高不一定越好':68 '測試專案需安裝':224 '測試所有條件分支':475 '測試是否真正驗證了預期行為':506 '測試案例數量決策':348 '測試涵蓋範圍視圖':156 '測試輸入值的上下限':365 '漸進式改善流程':302 '無法顯示覆蓋率':452 '無需額外擴充套件':109 '燒杯圖示':150 '版本':439,446 '產生':509 '產生報告':403 '產生覆蓋率報告':518 '產生覆蓋率報告或設定':9 '用來統計測試執行時實際執行了多少程式碼':55 '異常測試':367 '異常處理':330 '當需要分析程式碼覆蓋率':8 '的測試':75 '目標':306,312,318 '相關技能':571 '看不到覆蓋率':437 '確保包含':515 '確保所有分支都有測試':374 '確認已啟用覆蓋率收集':448 '確認已安裝':423,454 '確認測試有實際執行':431 '程式碼涵蓋範圍實戰指南':533 '程式碼覆蓋率':51 '程式碼覆蓋率分析完整指南':7 '程式碼覆蓋率分析指南':47 '程式碼覆蓋率是手段':503 '第一階段':304 '第三階段':316 '第二階段':310 '等於至少需要的測試案例數量':281 '管線使用':524 '範本檔案':497 '簡單':273,336 '紅色':244 '紅色區域':471 '結合複雜度指標':276 '綠色':240 '維持階段':322 '編輯器內顯示':157 '編輯器直接標示':94 '總分支數':259 '總方法數':266 '總行數':252 '考慮重構過於複雜的方法':479 '自動化':102 '自動產生的程式碼':340 '處理異常情境':317 '行覆蓋率':250 '被執行的分支數':258 '被執行的方法數':265 '被執行的行數':251 '補充邊界條件測試':311,473 '覆蓋核心業務邏輯':305 '覆蓋正常的業務流程':371 '覆蓋率分析可整合至':388 '覆蓋率工具選擇':76 '覆蓋率指標':246 '覆蓋率檢查時使用':11 '覆蓋率為唯一目標':360 '覆蓋率設定範本':499 '覆蓋率顯示':420 '解讀覆蓋率報告':238 '計算循環複雜度':293 '設定':14,116,222 '設定是否正確':429 '設定檔':511 '設定範例請參閱':415 '評估必要性':272 '評估測試完整性':58 '識別未覆蓋的關鍵程式碼':470 '識別邊界條件和異常情況':352 '資料轉換':332 '資料驗證':328 '跨平台':100,108 '輔助重構決策':59 '輸出格式':508 '適用場景':79 '選項':128 '邊界測試':364 '部分分支未測試':271 '部分覆蓋':243 '都會增加複雜度':287 '配置範例請參考':235 '配置覆蓋率收集參數與排除規則':512 '重新執行':459 '重點在於關鍵業務邏輯是否都有測試':505 '重點是測試的有效性':69 '金融計算':327 '鐵人賽文章':534 '開啟測試總管':149,189,220 '開發':112 '開發者會為了衝數字而寫沒有':73 '閾值':231 '關注未覆蓋的關鍵程式碼':380 '顏色標示':239 '類別':339 '顯示可維護性指標':292 '顯示每個方法的複雜度':297 '驗證錯誤處理邏輯':368 '高優先級':325 '黃色':242 '點選':152,190","prices":[{"id":"eefdf8c7-0cc8-4fc6-8c12-e4c0aa6e9344","listingId":"3045b9fc-081a-420c-994b-ded3d9b948e7","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"kevintsengtw","category":"dotnet-testing-agent-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T23:04:27.953Z"}],"sources":[{"listingId":"3045b9fc-081a-420c-994b-ded3d9b948e7","source":"github","sourceId":"kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-code-coverage-analysis","sourceUrl":"https://github.com/kevintsengtw/dotnet-testing-agent-skills/tree/main/skills/dotnet-testing-code-coverage-analysis","isPrimary":false,"firstSeenAt":"2026-04-18T23:04:27.953Z","lastSeenAt":"2026-04-24T13:02:26.631Z"}],"details":{"listingId":"3045b9fc-081a-420c-994b-ded3d9b948e7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"kevintsengtw","slug":"dotnet-testing-code-coverage-analysis","github":{"repo":"kevintsengtw/dotnet-testing-agent-skills","stars":23,"topics":["agent-skills","ai-assisted-development","copilot-skills","csharp","dotnet","dotnet-testing","github-copilot","integration-testing","testing","unit-testing","xunit"],"license":"mit","html_url":"https://github.com/kevintsengtw/dotnet-testing-agent-skills","pushed_at":"2026-03-31T07:28:56Z","description":"AI Agent Skills for .NET Testing - Based on 30-Day Testing Challenge (iThome Ironman 2025 Winner)","skill_md_sha":"14e1c3174436d59e003e842bdc155a1b9dfdc4ba","skill_md_path":"skills/dotnet-testing-code-coverage-analysis/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/kevintsengtw/dotnet-testing-agent-skills/tree/main/skills/dotnet-testing-code-coverage-analysis"},"layout":"multi","source":"github","category":"dotnet-testing-agent-skills","frontmatter":{"name":"dotnet-testing-code-coverage-analysis","description":"程式碼覆蓋率分析完整指南。當需要分析程式碼覆蓋率、產生覆蓋率報告或設定 CI/CD 覆蓋率檢查時使用。涵蓋 Coverlet 設定、報告產生、指標解讀與循環複雜度整合。包含 Fine Code Coverage、VS Code 內建工具與最佳實踐。\nMake sure to use this skill whenever the user mentions code coverage, Coverlet, coverage report, branch coverage, cyclomatic complexity, or test quality metrics, even if they don't explicitly ask for coverage analysis.\nKeywords: code coverage, 程式碼覆蓋率, 覆蓋率分析, coverage report, Coverlet, Fine Code Coverage, dotnet-coverage, ReportGenerator, line coverage, branch coverage, 行覆蓋率, 分支覆蓋率, cyclomatic complexity, 循環複雜度, runsettings, cobertura"},"skills_sh_url":"https://skills.sh/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-code-coverage-analysis"},"updatedAt":"2026-04-24T13:02:26.631Z"}}