指定测试命令 - Amazon CodeBuild
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

指定测试命令

您可以在 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 语法