我嘗試將 XRay 集成到我的 Jenkins 管道(宣告式)中,所以我添加了如下步驟:
stage('Export features from Xray') {
steps{
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE'){
step([$class: 'XrayExportBuilder', filePath: 'repoName/src/test/resources/io/cucumber/suite', filter: '21082', serverInstance: '770abc84-96c5-499c-b0d4-84baec112730'])
}
}
}
最后,我將所有功能匯出到一個檔案中,這對于進一步的測驗執行程序來說是一個問題,因為只處理第一個場景。
這是一個控制臺日志:
Starting XRAY: Cucumber Features Export Task...
##########################################################
#### Xray is exporting the feature files ####
##########################################################
Filter: 21082
Will save the feature files in: repoName/src/test/resources/io/cucumber/suite
###################### Unzipping file ####################
###################### Unzipped file #####################
Successfully exported the Cucumber features
XRAY_RAW_RESPONSE:
XRAY_TEST_EXECS:
XRAY_ISSUES_MODIFIED:
XRAY_IS_REQUEST_SUCCESSFUL: true
XRAY_TESTS:
據我所知,XrayExportBuilder 在設定(使用 jenkins UI)作為自定義作業(而不是管道)的一部分時將功能放在單獨的檔案中。在管道作業中是否有機會以相同的方式優化匯出?
更新。似乎 xray 云版本的業務邏輯不包括將 xray 測驗用例正確匯出到單獨的功能檔案中的可能性,以防這些測驗用例未鏈接到任何 jira-task/requirement/story。
當您將一個測驗用例鏈接到多個工單時,問題就出現了。然后 exportBuilder 為每個鏈接的 jira-issue 創建功能檔案,結果將提到的測驗用例復制到每個功能檔案中
uj5u.com熱心網友回復:
事實上,如檔案中所述,Xray 會根據要求生成一個功能:https ://docs.getxray.app/display/XRAYCLOUD/Generate Cucumber Features 這些規則是所有 Cucumber 功能匯出的基礎。
如果您有任何建議,請使用支持鏈接添加:https ://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal/2 。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/497279.html
上一篇:嵌套INNERJOIN的問題
