Skip to main content
Version: 5.9.x

test

Adds an invocation of 'bazel test' to the build.

Table of contents

Properties

Properties

artifact_paths

artifact_paths: readonly string[] = []

List of paths or glob pattens that are used to save artifacts

Inherited from

build.artifact_paths


bazel

bazel: BazelConfiguration

Configuration for the bazel invocation for this task

Inherited from

build.bazel


cci

Optional cci: CircleCIConfiguration

Properties relating to CircleCI for the task

Inherited from

build.cci


coverage

coverage: boolean | CoverageConfiguration = false

If coverage should be enabled when running test


env

env: Map<string, string>

Environment variables to set on this task. Overrides those set globally

Inherited from

build.env


filters

filters: readonly string[] = []

Test target tag filters to be applied


flags

flags: readonly string[] = []

List of Bazel flags to be applied to the invocation

Deprecated

Set BazelConfiguration.flags instead

Inherited from

build.flags


hooks

Optional hooks: TaskHook[]

Hooks are commands that can be conditionally run at various stages within a task. For example, they can be used for setting up test databases before a test task runs, and then performing cleanup after.

Hooks can provide a conditional expression which will be evaluated before they are run, allowing for hooks to be conditional on certain aspects of the build.

See

ConditionExpression for more information on conditions.

Inherited from

build.hooks


icon

icon: string = 'bazel'

The emoji icon used in the tasks label

Inherited from

build.icon


include_eternal_tests

include_eternal_tests: boolean = false

If true, Workflows will include tests in the test run that are tagged as "timeout: eternal". By default, these are excluded as they can cause de-optimizations when running tests and waiting for a timeout on CI.


queue

Optional queue: string

The queue / runner pool that this task will run on. By default, takes the value of the top level 'queue' property in the Workflows configuration.

Inherited from

build.queue


targets

targets: readonly string[] = BuildTaskConfiguration.DEFAULT_TARGETS

List of Bazel targets that will be invoked as part of this invocation

Inherited from

build.targets


timeout_in_minutes

timeout_in_minutes: number = 180

The amount of time in minutes that this step will time out after. Timed out steps will cause the build to fail.

Inherited from

build.timeout_in_minutes


upload_test_logs

upload_test_logs: UploadTestLogStrategy = UploadTestLogStrategy.Failed

When to upload test.xml and test.log files. See UploadTestLogStrategy for available values.


without

without: boolean = false

Setting this will exclude this task from being created when using additional workspace overrides

Inherited from

build.without