指定測試命令 - AWS CodeBuild

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

指定測試命令

您可以在 buildspec 檔案的 commands 區段中指定執行測試案例的命令。這些命令會在 buildspec 檔案的 reports 區段中執行為報告群組指定的測試案例。以下範例 commands 區段包括要執行測試檔案中測試的命令:

commands: - echo Running tests for surefire junit - mvn test -f surefire/pom.xml -fn - echo - echo Running tests for cucumber with json plugin - mvn test -Dcucumber.options="--plugin json:target/cucumber-json-report.json" -f cucumber-json/pom.xml -fn

如需詳細資訊,請參閱 Buildspec 語法