跳至主要內容

Teamcity 報告器

wdio-teamcity-reporter 是一個第三方套件,如需更多資訊,請參閱 GitHub | npm

WebdriverIO Teamcity 報告器,可即時顯示測試結果,並在「建置結果」頁面的「測試」索引標籤中提供測試資訊。

安裝

npm install wdio-teamcity-reporter --save-dev

關於如何安裝 WebdriverIO 的說明,請參閱此處:https://webdriverio.dev.org.tw/docs/gettingstarted

設定

在您的 wdio.conf.js 檔案中新增報告器

exports.config = {
// ...
reporters: [
[
'teamcity',
{
captureStandardOutput: false, // optional
flowId: true, // optional
message: '[title]', // optional
}
]
],
// ...
}

選項

  • captureStandardOutput (布林值) — 若為 true,則在 testStartedtestFinished 訊息之間收到的所有標準輸出 (和標準錯誤) 訊息都將被視為測試輸出。預設值為 false,並假設使用 testStdOut 和 testStdErr 服務訊息來報告測試輸出。預設為 false
  • flowId (布林值) — 若為 trueflowId 屬性會被新增至所有訊息。流程追蹤是必要的,例如為了區分平行執行的個別處理程序。預設為 true
  • message (字串) — 可以為名稱屬性提供特定格式。可能的鍵:[browser][title]。範例:[browser] / [title]。預設為 [title]

授權

MIT 授權條款

歡迎!我能如何幫您?

WebdriverIO AI Copilot