Skip to Content
工具煙霧測試

煙霧測試

在開始前端整合前,可用此工具確認目標環境、Bearer token 與自訂資料表範圍能完成一組精簡的真實 API 流程。每個步驟都會檢查 HTTP status 與必要的回應欄位;即使請求失敗或手動中止,仍會嘗試刪除暫存資料列與資料表。

Token 只會儲存在瀏覽器的 localStorage,請求會直接送往指定的 API base URL。聊天室 ID 留白時,runner 會自動建立、設定並刪除一個暫存聊天室。IaC 套件只呼叫 stateplan,不會套用文件。

CLI + browser

環境煙霧測試

執行一組精簡的讀寫流程、逐步驗證回應,並在失敗或中止時清除暫存資源。

選擇套件後,對目標環境執行測試。
  1. 建立暫存資料表tables.create
  2. 新增欄位columns.create
  3. 新增資料列records.create
  4. 搜尋資料列records.search
  5. 讀取新增的資料列records.get
  6. 刪除資料列records.delete
    清理
  7. 刪除資料表tables.delete
    清理

CLI 對應工具

Headless runner 使用相同的已產生 JSON sequences,需要 Node.js 20 以上版本,執行時不依賴 npm 套件,也不會輸出 token。

node scripts/smoke.mjs \ --base https://api.scfg.io \ --token "$TOKEN" \ --suite basic

node scripts/smoke.mjs --list 列出套件。若要使用既有聊天室,傳入 --chatroom-id;省略時則會使用並移除暫存聊天室。以一般 token 執行 ACL 套件時,另以 --user-id 指定目標使用者。

Last updated on