指定測試檔案 - AWS CodeBuild

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

指定測試檔案

您可以在建置專案 buildspec 檔案的 reports 區段中,指定每個報告群組的測試結果檔案及其位置。如需詳細資訊,請參閱 Reports syntax in the buildspec file

以下是指定建置專案的兩個報告群組的範例 reports 區段。一個以其 ARN 指定,另一個則以名稱指定。files 區段指定包含測試案例結果的檔案。選用 base-directory 區段指定測試案例檔案所在的目錄。可選discard-paths部分指定是否捨棄上傳至 Amazon S3 儲存貯體的測試結果檔案路徑。

reports: arn:aws:codebuild:your-region:your-aws-account-id:report-group/report-group-name-1: #surefire junit reports files: - '**/*' base-directory: 'surefire/target/surefire-reports' discard-paths: false sampleReportGroup: #Cucumber reports from json plugin files: - 'cucumber-json/target/cucumber-json-report.json' file-format: CUCUMBERJSON #Type of the report, defaults to JUNITXML