Correctly generate test suites and all targets for java selenium tests
@@ -73,6 +73,8 @@ def selenium_test(name, test_class, size = "medium", browsers = BROWSERS.keys(),
stripped_args.pop("jvm_flags", None)
stripped_args.pop("tags", None)
+ all_tests = []
+
for browser in browsers:
if not browser in BROWSERS:
fail("Unrecognized browser: " + browser)
@@ -89,6 +91,12 @@ def selenium_test(name, test_class, size = "medium", browsers = BROWSERS.keys(),
data = BROWSERS[browser]["data"] + data,
**stripped_args
)
+ if browser == default_browser:
+ native.alias(
+ name = "%s-%s" % (name, browser),
+ actual = test,
+ )
+ all_tests.append(":%s" % test)
if "selenium-remote" in tags:
java_junit5_test(
@@ -106,6 +114,7 @@ def selenium_test(name, test_class, size = "medium", browsers = BROWSERS.keys(),
],
**stripped_args
)
+ all_tests.append(":%s-remote" % test)
# Handy way to run everything
- native.test_suite(name = "%s-all-browsers" % name, tests = [":%s-%s" % (name, default_browser)], tags = tags + ["manual"])
+ native.test_suite(name = "%s-all-browsers" % name, tests = all_tests, tags = tags + ["manual"])
