Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Configure parallel tests with Go

Focus mode
Configure parallel tests with Go - AWS CodeBuild

The following is sample of a buildspec.yml that shows parallel test execution with Go on an Linux platform:

version: 0.2 batch: fast-fail: false build-fanout: parallelism: 5 ignore-failure: false phases: install: commands: - echo 'Fetching Go version' - go version pre_build: commands: - echo 'prebuild' build: commands: - echo 'Running go Tests' - go mod init calculator - cd calc - | codebuild-tests-run \ --test-command "go test -v calculator.go" \ --files-search "codebuild-glob-search '**/*test.go'" post_build: commands: - echo "Test execution completed"

In above example, calculator.go function contains simple mathematical functions to test and all test files and calculator.go file is inside calc folder.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.