Clavue Ability · 能力目錄
技能 · 研發工程

單元測試自動生成

生成覆蓋正常路徑、邊界與異常的聚焦單元測試。

執行摘要

簡短回答:生成覆蓋正常路徑、邊界與異常的聚焦單元測試。。輸入是函數原始碼、測試框架、現有測試規範,輸出是測試檔案、用例清單、覆蓋率說明。

本頁能力來自 Clavue Bot 內置目錄;不宣稱與任何第三方產品 1:1 對齊。

商業回報與使用場景

商業價值:

單元測試自動生成 減少重複手工操作,更快拿到可復核的結果。

  • 相關需求主題: 研發編程

輸入輸出契約

輸入輸出工具 / 連接器
函數原始碼、測試框架、現有測試規範測試檔案、用例清單、覆蓋率說明程式碼 · GitHub

需先連接工具 · 涉及寄信、付款等動作時會先請你確認。

工作流程與操作說明

1

Understand the function contract and side effects.

2

List happy-path, boundary and failure cases.

3

Write isolated tests using the project's existing framework.

4

Mock external dependencies deterministically.

5

Verify all tests pass and note uncovered branches.

涉及寄信、付款等動作時會先請你確認。

SKILL.md

# 單元測試自動生成

> 生成覆蓋正常路徑、邊界與異常的聚焦單元測試。

## 輸入輸出契約

- **輸入:** 函數原始碼、測試框架、現有測試規範
- **輸出:** 測試檔案、用例清單、覆蓋率說明

## 工作流程與操作說明

2. Understand the function contract and side effects.
4. List happy-path, boundary and failure cases.
6. Write isolated tests using the project's existing framework.
8. Mock external dependencies deterministically.
10. Verify all tests pass and note uncovered branches.

## 起手提示詞

```text
為這個函數編寫覆蓋邊界情況的單元測試。
```

起手提示詞

為這個函數編寫覆蓋邊界情況的單元測試。

常見問題

這是一項真實存在於 Clavue Bot 的能力嗎?

是的。本頁內容由產品內置目錄生成,能力名稱、輸入輸出與操作步驟都對應真實可用的場景、技能、MCP 工具或數字員工。

需要額外配置工具或連接器嗎?

標注「開箱即用」的能力無需額外工具;標注「需連接工具」的能力會列出所需連接器,首次運行時按提示授權即可。

它會未經確認就發郵件或付款嗎?

不會。寄信、付款、提交表單等對外動作會停下來先請你確認,你同意後才會繼續。

查看 Markdown 原文