5E Windows Service 實作測試案例與停止線稽核表

返回文件索引

本表定義 5E 第一批程式實作後需要通過的測試與停止線。確認前只作為測試規格,不修改程式 repo。

1. 建議測試案例

編號測試重點
1service options 不可為空,且不得包含敏感資訊。
2預設不啟用 Windows Service path,既有 console smoke path 保持可用。
3service hosting wrapper 啟動時呼叫 IServiceHostRuntime.Start()
4service hosting wrapper 停止時呼叫 IServiceHostRuntime.Stop()
5runtime start 失敗時回報可追蹤錯誤,不吞 exception。
6install / uninstall / start / stop script 若存在,預設必須拒絕執行。

2. 必跑測試

測試範圍指令
ServiceHost testsdotnet test tests\HS.DeviceControl.ServiceHost.Tests\HS.DeviceControl.ServiceHost.Tests.csproj --no-restore
Application testsdotnet test tests\HS.DeviceControl.Application.Tests\HS.DeviceControl.Application.Tests.csproj --no-restore
Solution testsdotnet test HS.DeviceControl.sln --no-restore

3. 停止線

4. 結論

5E 第一批實作需先證明 ServiceHost 可以以可測試的 service hosting contract 承接 Windows Service 化;正式 service install、service account、recovery、正式 log / config path 與部署權限仍應作為後續 manual-only 驗收或獨立確認節點。