Skip to content

Commit

Permalink
[java] Running full standard test set with Bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Nov 24, 2018
1 parent 5c9328c commit 13d7e01
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 5 deletions.
9 changes: 8 additions & 1 deletion java/client/test/org/openqa/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ java_library(
gen_java_tests(
size = "large",
tags = [ "firefox" ],
srcs = glob([ "ClickTest.java" ], exclude = SMALL_TESTS),
srcs = glob([ "*Test.java" ], exclude = SMALL_TESTS),
jvm_flags = [
"-Dselenium.browser=ff",
],
Expand All @@ -59,10 +59,17 @@ gen_java_tests(
"//java/client/src/org/openqa/selenium/firefox",
"//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",
"//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",
"//third_party/java/mockito",
"//third_party/java/netty",
"//third_party/java/servlet:javax.servlet-api",
],
)
7 changes: 6 additions & 1 deletion java/client/test/org/openqa/selenium/I18nTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ public class I18nTest extends JUnit4TestBase {
*/
private static final String tokyo = "\u6771\u4EAC";

/**
* Chinese for "The Voice of China"
*/
private static final String theVoiceOfChina = "\u4E2D\u56FD\u4E4B\u58F0";

@Test
public void testCn() {
driver.get(pages.chinesePage);
driver.findElement(By.linkText(Messages.getString("I18nTest.link1"))).click();
driver.findElement(By.linkText(theVoiceOfChina)).click();
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion java/client/test/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ gen_java_tests(
"//third_party/java/assertj",
"//third_party/java/guava",
"//third_party/java/junit",
"//third_party/java/mockito:mockito-core",
"//third_party/java/mockito",
],
)
1 change: 1 addition & 0 deletions third_party/java/jetty/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ java_library(
"maven_pom_template=jetty.pom",
],
visibility = [
"//java/client/test/org/openqa/selenium:__pkg__",
"//java/client/test/org/openqa/selenium/environment:__pkg__",
"//java/server/src/org/openqa:__subpackages__",
],
Expand Down
2 changes: 1 addition & 1 deletion third_party/java/littleshoot/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
prebuilt_jar(
name = 'littleproxy',
name = 'littleshoot',
maven_coords = 'org.littleshoot:littleproxy:jar:1.1.3-SNAPSHOT',
binary_jar = 'littleproxy-1.1.3-SNAPSHOT.jar',
deps = [
Expand Down
13 changes: 13 additions & 0 deletions third_party/java/littleshoot/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
java_import(
name = "littleshoot",
jars = [
"littleproxy-1.1.3-SNAPSHOT.jar",
],
licenses = [
"notice", # Apache 2
],
visibility = [
"//java/client/test:__subpackages__",
"//java/server/test:__subpackages__",
],
)
2 changes: 1 addition & 1 deletion third_party/java/mockito/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
java_import(
name = "mockito-core",
name = "mockito",
jars = ["mockito-core-2.18.0.jar"],
licenses = [
"notice", # MIT
Expand Down
15 changes: 15 additions & 0 deletions third_party/java/netty/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
java_import(
name = "netty",
jars = [
"netty-all-4.1.25.Final.jar",
],
licenses = [
"notice", # Apache 2
],
srcjar = "netty-all-4.1.25.Final-sources.jar",
visibility = [
"//java/client/test:__subpackages__",
"//java/server/test:__subpackages__",
"//third_party/java/littleshoot:__pkg__",
],
)
1 change: 1 addition & 0 deletions third_party/java/servlet/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ java_import(
"maven_coordinates=javax.servlet:javax.servlet-api:jar:3.1.0",
],
visibility = [
"//java/client/test/org/openqa/selenium:__pkg__",
"//java/client/test/org/openqa/selenium/environment:__pkg__",
"//java/server/src/org/openqa/selenium/grid/server:__pkg__",
"//third_party/java/jetty:__pkg__",
Expand Down

0 comments on commit 13d7e01

Please sign in to comment.