技能 run-tests
📦

run-tests

安全 ⚡ 包含脚本🌐 网络访问📁 文件系统访问⚙️ 外部命令

運行單元測試和整合測試

也可从以下获取: Clouder0

在 Catalyst-Relay 上工作的開發人員需要驗證其程式碼變更是否正確運作。此技能使用 bun test 執行單元測試,並引導使用者透過適當的憑證處理完成 SAP 整合測試。

支持: Claude Codex Code(CC)
📊 69 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“run-tests”。 Run the tests to verify my changes

预期结果:

  • Running unit tests with bun test...
  •  
  • ✓ CDS View lifecycle tests passed (12 tests)
  • ✓ ABAP Class CRUD tests passed (8 tests)
  • ✓ Access Control tests passed (5 tests)
  •  
  • Test Suites: 3 passed, 3 total
  • Tests: 25 passed, 25 total
  • Time: 2.5s

正在使用“run-tests”。 Run the integration tests with my SAP credentials

预期结果:

  • Integration tests require SAP credentials.
  •  
  • Please run: ./test.bat <SAP_PASSWORD>
  •  
  • I'll wait for you to confirm the tests completed.
  • Once done, I'll read test.output to display the results.

安全审计

安全
v6 • 1/21/2026

All 41 static findings are false positives. The skill is a legitimate test runner for Catalyst-Relay. Scanner misinterpreted markdown code fences as shell backticks, documentation examples as dynamic imports, and SHA256 hashes as weak cryptographic algorithms. Integration tests require explicit user consent and manual password entry.

2
已扫描文件
520
分析行数
4
发现项
6
审计总数

风险因素

⚡ 包含脚本
未记录任何特定位置
🌐 网络访问
未记录任何特定位置
📁 文件系统访问
未记录任何特定位置
⚙️ 外部命令
未记录任何特定位置
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
85
内容
21
社区
100
安全
91
规范符合性

你能构建什么

快速測試驗證

在進行程式碼變更後執行所有單元測試,以驗證在提交前沒有破壞任何功能。

SAP 整合測試

針對即時 SAP 系統執行完整的整合測試,以驗證 CDS 檢視、ABAP 類別、程式和資料表操作。

測試驅動開發

在開發時以監控模式執行測試,以即時查看程式碼變更的測試結果。

试试这些提示

基本測試執行
Run the tests to verify my changes work correctly.
監控模式
Run the tests in watch mode so I can see results as I make changes.
特定測試
Run the tests for the core module in src/__tests__/core.
整合測試
I need to run the integration tests against SAP. My credentials are configured.

最佳实践

  • 在提交前執行測試以及早發現回歸問題
  • 在積極開發時使用監控模式以獲得快速回饋
  • 在發布前使用匯入檢查驗證 Node.js 相容性
  • 將整合測試憑證分開存放,切勿提交至版本控制

避免

  • 未正確驗證憑證設定就執行整合測試
  • 為節省時間在推送變更前跳過測試
  • 只修改了一個模組卻執行所有測試
  • 忽視測試失敗並繼續開發

常见问题

如何執行所有單元測試?
只需要求執行測試即可。此技能將執行 bun test 來執行專案中的所有單元測試。
我可以執行特定目錄的測試嗎?
可以。指定目錄路徑如 src/__tests__/core,此技能將只執行該位置的測試。
整合測試需要哪些憑證?
整合測試需要 SAP_TEST_ADT_URL、SAP_TEST_CLIENT、SAP_TEST_USERNAME 和 SAP_PASSWORD。請參考 .env.templ 中的範本。
如何以監控模式執行測試?
要求以監控模式執行測試。此技能將執行 bun test --watch,在檔案變更時重新執行測試。
Node.js 相容性檢查的功能是什麼?
它使用實驗性的 strip-types 旗標來驗證 TypeScript/ESM 匯入在 Node.js 中是否能正確運作。
測試結果儲存在哪裡?
單元測試結果會直接顯示。整合測試結果會在 test.bat 腳本完成後從 test.output 檔案讀取。

开发者详情

文件结构

📄 SKILL.md