Specify test commands - Amazon CodeBuild
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Specify test commands

You specify the commands that run your test cases in the commands section of your buildspec file. These commands run the test cases specified for your report groups in the reports section of your buildspec file. The following is a sample commands section that includes commands to run the tests in test files:

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

For more information, see Buildspec syntax.