WARNING: this is beta-quality software. Breaking changes are likely. Not recommended for production use without expert support.
The Protractor rules run tests under the Protractor framework with Bazel.
Add the @bazel/protractor npm package to your devDependencies in package.json.
Your WORKSPACE should declare a yarn_install or npm_install rule named npm. It should then install the rules found in the npm packages using the `install_bazel_dependencies' function. See https://github.com/bazelbuild/rules_nodejs/#quickstart
This causes the @bazel/protractor package to be installed as a Bazel workspace named npm_bazel_protractor.
Runs a protractor test in a browser.
protractor_web_test(name, configuration, on_prepare, srcs, deps, data, server, tags, protractor, protractor_entry_point, kwargs)
nameThe name of the test
configurationProtractor configuration file.
Defaults to None
on_prepareA 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.
Defaults to None
srcsJavaScript source files
Defaults to []
depsOther targets which produce JavaScript such as ts_library
Defaults to []
dataRuntime dependencies
Defaults to []
serverOptional server executable target
Defaults to None
tagsStandard Bazel tags, this macro adds one for ibazel
Defaults to []
protractorA label providing the @bazel/protractor npm dependency.
Defaults to "@npm//@bazel/protractor"
protractor_entry_pointA label providing the @bazel/protractor entry point.
Defaults to "@npm//:node_modules/@bazel/protractor/protractor.js"
kwargspassed through to _protractor_web_test
Defines a test_suite of web_test targets that wrap a protractor_web_test target.
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, protractor_entry_point, remaining_keyword_args)
nameThe base name of the test.
configurationProtractor configuration file.
Defaults to None
on_prepareA 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.
Defaults to None
srcsJavaScript source files
Defaults to []
depsOther targets which produce JavaScript such as ts_library
Defaults to []
dataRuntime dependencies
Defaults to []
serverOptional server executable target
Defaults to None
browsersA sequence of labels specifying the browsers to use.
Defaults to None
argsArgs for web_test targets generated by this extension.
Defaults to None
browser_overridesDictionary; 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}}.
Defaults to None
configLabel; optional; Configuration of web test features.
Defaults to None
flakyA boolean specifying that the test is flaky. If set, the test will be retried up to 3 times (default: 0)
Defaults to None
localboolean; optional.
Defaults to None
shard_countThe number of test shards to use per browser. (default: 1)
Defaults to None
sizeA string specifying the test size. (default: ‘large’)
Defaults to None
tagsA list of test tag strings to apply to each generated web_test target. This macro adds a couple for ibazel.
Defaults to []
test_suite_tagsA list of tag strings for the generated test_suite.
Defaults to None
timeoutA string specifying the test timeout (default: computed from size)
Defaults to None
visibilityList of labels; optional.
Defaults to None
web_test_dataData dependencies for the web_test.
Defaults to []
wrapped_test_tagsA list of test tag strings to use for the wrapped test
Defaults to None
protractorProtractor 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.
Defaults to "@npm//@bazel/protractor"
protractor_entry_pointDefaults to "@npm//:node_modules/@bazel/protractor/protractor.js"
remaining_keyword_argsArguments for the wrapped test target.