Run end-to-end tests with Protractor
Bazel

Run end-to-end tests with Protractor


protractor_web_test

protractor_web_test(name, configuration, on_prepare, srcs, deps, data, server, tags, protractor, **kwargs)

Runs a protractor test in a browser.

Attributes

name

Name; Required

The name of the test

configuration

Unknown; Optional

Protractor configuration file.

on_prepare

Unknown; Optional

A file with a node.js script to run once before all tests run. If the script exports a function which returns a promise, protractor will wait for the promise to resolve before beginning tests.

srcs

List of strings; Optional

JavaScript source files

deps

List of strings; Optional

Other targets which produce JavaScript such as ts_library

data

List of strings; Optional

Runtime dependencies

server

Unknown; Optional

Optional server executable target

tags

List of strings; Optional

Standard Bazel tags, this macro adds one for ibazel

protractor

String; Optional

Protractor entry_point. Defaults to @npm//:node_modules/protractor/bin/protractor but should be changed to @your_npm_workspace//:node_modules/protractor/bin/protractor if you are not using @npm for your npm dependencies.

**kwargs

Unknown; Optional

passed through to _protractor_web_test


protractor_web_test_suite

protractor_web_test_suite(name, configuration, on_prepare, srcs, deps, data, server, browsers, args, browser_overrides, config, flaky, local, shard_count, size, tags, test_suite_tags, timeout, visibility, web_test_data, wrapped_test_tags, protractor, **remaining_keyword_args)

Defines a test_suite of web_test targets that wrap a protractor_web_test target.

Attributes

name

Name; Required

The base name of the test.

configuration

Unknown; Optional

Protractor configuration file.

on_prepare

Unknown; Optional

A file with a node.js script to run once before all tests run. If the script exports a function which returns a promise, protractor will wait for the promise to resolve before beginning tests.

srcs

List of strings; Optional

JavaScript source files

deps

List of strings; Optional

Other targets which produce JavaScript such as ts_library

data

List of strings; Optional

Runtime dependencies

server

Unknown; Optional

Optional server executable target

browsers

List of strings; Optional

A sequence of labels specifying the browsers to use.

args

Unknown; Optional

Args for web_test targets generated by this extension.

browser_overrides

Unknown; Optional

Dictionary; optional; default is an empty dictionary. A dictionary mapping from browser names to browser-specific web_test attributes, such as shard_count, flakiness, timeout, etc. For example: {'//browsers:chrome-native': {'shard_count': 3, 'flaky': 1} '//browsers:firefox-native': {'shard_count': 1, 'timeout': 100}}.

config

Unknown; Optional

Label; optional; Configuration of web test features.

flaky

Unknown; Optional

A boolean specifying that the test is flaky. If set, the test will be retried up to 3 times (default: 0)

local

Unknown; Optional

boolean; optional.

shard_count

Unknown; Optional

The number of test shards to use per browser. (default: 1)

size

Unknown; Optional

A string specifying the test size. (default: 'large')

tags

List of strings; Optional

A list of test tag strings to apply to each generated web_test target. This macro adds a couple for ibazel.

test_suite_tags

Unknown; Optional

A list of tag strings for the generated test_suite.

timeout

Unknown; Optional

A string specifying the test timeout (default: computed from size)

visibility

Unknown; Optional

List of labels; optional.

web_test_data

List of strings; Optional

Data dependencies for the web_test.

wrapped_test_tags

Unknown; Optional

A list of test tag strings to use for the wrapped test

protractor

String; Optional

Protractor entry_point. Defaults to @npm//:node_modules/protractor/bin/protractor but should be changed to @your_npm_workspace//:node_modules/protractor/bin/protractor if you are not using @npm for your npm dependencies.

**remaining_keyword_args

Unknown; Optional

Arguments for the wrapped test target.