Skip to content

Commit

Permalink
[bazel] More fun with test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jul 16, 2019
1 parent fe1a79a commit e2b2b97
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
63 changes: 52 additions & 11 deletions java/client/test/org/openqa/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
test_suite(
name = "small-tests",
tags = ["manual"],
tests = [
"//java/client/test/org/openqa/selenium/atoms:SmallTests",
"//java/client/test/org/openqa/selenium/io:SmallTests",
"//java/client/test/org/openqa/selenium/net:SmallTests",
"//java/client/test/org/openqa/selenium/os:AllTests",
# "//java/client/test/org/openqa/selenium/support:small-tests",
"//java/client/test/org/openqa/selenium/testing:SmallTests",
],
load("//java:test.bzl", "java_test_suite", "java_selenium_test_suite")

SMALL_TESTS = [
"ArchitectureTest.java",
"ByTest.java",
"CookieTest.java",
"DimensionTest.java",
"ImmutableCapabilitiesTest.java",
"KeysTest.java",
"OutputTypeTest.java",
"PlatformTest.java",
"PointTest.java",
"ProxyTest.java",
"WebDriverExceptionTest.java",
]

java_test_suite(
name = "SmallTests",
size = "small",
srcs = SMALL_TESTS,
deps = [
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/json",
"//third_party/java/assertj",
"//third_party/java/junit",
"//third_party/java/guava",
"//third_party/java/mockito:mockito-core",
]
)

java_library(
Expand All @@ -32,6 +49,30 @@ java_library(
],
)

java_selenium_test_suite(
name = "LargeTests",
size = "large",
srcs = glob(["*Test.java"], exclude = SMALL_TESTS),
deps = [
":helpers",
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/support",
"//java/client/test/org/openqa/selenium/build",
"//java/client/test/org/openqa/selenium/environment",
"//java/client/test/org/openqa/selenium/testing:annotations",
"//java/client/test/org/openqa/selenium/testing:test-base",
"//java/client/test/org/openqa/selenium/testing/drivers",
"//third_party/java/assertj",
"//third_party/java/guava",
"//third_party/java/jetty",
"//third_party/java/junit",
"//third_party/java/littleshoot:littleproxy",
"//third_party/java/servlet:javax.servlet-api",
]
)

# TODO: replace with smaller suites
java_library(
name = "tests",
srcs = glob([
Expand Down
3 changes: 2 additions & 1 deletion java/client/test/org/openqa/selenium/os/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
load("//java:test.bzl", "java_test_suite")

java_test_suite(
name = "AllTests",
name = "MediumTests",
size = "medium",
srcs = glob(["*.java"]),
deps = [
"//java/client/src/org/openqa/selenium:core",
Expand Down

0 comments on commit e2b2b97

Please sign in to comment.