2020-06-25 04:32:41 -04:00
|
|
|
load("@npm//@bazel/protractor:index.bzl", "protractor_web_test_suite")
|
2019-02-06 12:03:58 -05:00
|
|
|
|
|
|
|
"""
|
|
|
|
Macro that can be used to define a benchmark test. This differentiates from
|
|
|
|
a normal Protractor test suite because we specify a custom "perf" configuration
|
2020-01-13 12:57:06 -05:00
|
|
|
that sets up "@angular/benchpress". Benchmark test targets will not run on CI
|
|
|
|
unless explicitly requested.
|
2019-02-06 12:03:58 -05:00
|
|
|
"""
|
|
|
|
|
2020-01-16 08:34:03 -05:00
|
|
|
def benchmark_test(name, server, tags = [], **kwargs):
|
2019-02-06 12:03:58 -05:00
|
|
|
protractor_web_test_suite(
|
|
|
|
name = name,
|
2021-05-24 10:17:27 -04:00
|
|
|
browsers = ["//dev-infra/bazel/browsers/chromium:chromium"],
|
2020-04-24 16:14:28 -04:00
|
|
|
configuration = "//dev-infra/benchmark/component_benchmark:protractor-perf.conf.js",
|
|
|
|
on_prepare = "//dev-infra/benchmark/component_benchmark:start-server.js",
|
2019-02-06 12:03:58 -05:00
|
|
|
server = server,
|
2020-01-13 12:57:06 -05:00
|
|
|
# Benchmark targets should not run on CI by default.
|
2020-01-27 15:59:51 -05:00
|
|
|
tags = tags + [
|
|
|
|
"manual",
|
|
|
|
"no-remote-exec",
|
|
|
|
],
|
|
|
|
test_suite_tags = [
|
|
|
|
"manual",
|
|
|
|
"no-remote-exec",
|
|
|
|
],
|
2020-01-16 08:34:03 -05:00
|
|
|
**kwargs
|
2019-02-06 12:03:58 -05:00
|
|
|
)
|