Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
df8b7f3
test remove scala
mollyibot Mar 7, 2025
44f9756
test submodule
mollyibot Mar 7, 2025
f9bc681
test for submodule
mollyibot Mar 8, 2025
cd977d2
Refactor web submodules
mollyibot Mar 15, 2025
e3dbc07
Refactor more
mollyibot Mar 17, 2025
921f528
More polish
mollyibot Mar 17, 2025
1c4c8b6
Fix presubmit
mollyibot Mar 17, 2025
ac5737d
Add web modules build script
mollyibot Mar 17, 2025
e20cb79
Modify bazel CI
mollyibot Mar 17, 2025
1d290c0
More polish to bazel ci
mollyibot Mar 17, 2025
4e64e91
Revert auto formatting
mollyibot Mar 17, 2025
de27d52
More polish
mollyibot Mar 18, 2025
583083d
More polish
mollyibot Mar 18, 2025
b0497da
More polish
mollyibot Mar 18, 2025
74ffa27
More polish
mollyibot Mar 18, 2025
cc04d19
Modularize rules_webtesting
mollyibot Mar 18, 2025
3fd3f78
More polish
mollyibot Mar 18, 2025
7097ef4
More polish
mollyibot Mar 18, 2025
5acecd8
More polish
mollyibot Mar 19, 2025
007f966
Revert formatting
mollyibot Mar 19, 2025
62bbe07
Revert auto formatting
mollyibot Mar 19, 2025
2e6173b
Revert formatting
mollyibot Mar 19, 2025
d5543b3
Create symbol link
mollyibot Mar 19, 2025
f367409
change to relative path
mollyibot Mar 19, 2025
423602e
More polish
mollyibot Mar 19, 2025
db3bfdf
More polish
mollyibot Mar 20, 2025
6aa748f
Change sym link
mollyibot Mar 20, 2025
8a3b252
Modify readme
mollyibot Mar 20, 2025
a2c2afc
Modify ReadMe
mollyibot Mar 21, 2025
24f50e0
test pipeline
mollyibot Mar 22, 2025
afec4d7
Modify
mollyibot Mar 22, 2025
e40d5b5
modify2
mollyibot Mar 22, 2025
e41bad4
remove native tag
mollyibot Mar 29, 2025
2a5af80
enable native tests
mollyibot Mar 29, 2025
3699511
modify tests
mollyibot Mar 31, 2025
94e62f3
disable python chrome test as it is timeout
mollyibot Mar 31, 2025
946581e
test original test without external flag
mollyibot Apr 3, 2025
85907df
Update presubmit yml
mollyibot Apr 3, 2025
1312df5
Remove external and native
mollyibot Apr 3, 2025
ede487a
Update gazelle version
mollyibot Apr 3, 2025
90d393f
update the bazel ci to search for the libco
mollyibot Apr 16, 2025
1ad4a0e
install libxcb1
mollyibot Apr 16, 2025
0b03011
install more dynamic deps
mollyibot Apr 18, 2025
fcb2000
check packages
mollyibot Apr 18, 2025
700ccae
update install script
mollyibot Apr 18, 2025
d724934
intall more packages
mollyibot Apr 18, 2025
832eff7
Update config in macos
mollyibot Apr 22, 2025
70977d5
remove c
mollyibot Apr 22, 2025
82d1ba9
add libdbus-glib-1-2 for firefox
mollyibot Apr 23, 2025
3c566e9
update macos system libs
mollyibot Apr 24, 2025
d8f87a7
degrade python version
mollyibot Apr 24, 2025
688a6a7
Upgrade the webtest apiss
mollyibot Apr 26, 2025
aea2a49
specify version of py
mollyibot Apr 28, 2025
120a281
Remove tag
mollyibot Apr 28, 2025
83b4aeb
degrade
mollyibot Apr 28, 2025
d74a9ef
Update yml
mollyibot Apr 28, 2025
3d9e688
Add back build tag
mollyibot Apr 28, 2025
f460143
remove external and native
mollyibot Apr 28, 2025
410d77b
remove external and native
mollyibot Apr 28, 2025
8b6bdfa
Remove g
mollyibot Apr 28, 2025
4d3e25a
fall back marking tests as sauce
mollyibot Apr 28, 2025
78272e7
Add requirements
mollyibot May 1, 2025
01ed1c5
Modify yml file
mollyibot May 1, 2025
97c08e6
Testing
mollyibot May 1, 2025
7ad9fe4
testing with new shell command
mollyibot May 1, 2025
cff7b53
testing with new shell command
mollyibot May 1, 2025
fef8f98
testing with new shell command
mollyibot May 1, 2025
0c34f41
testing with new shell command
mollyibot May 1, 2025
ec42fda
Testing
mollyibot May 1, 2025
a6254b5
Update gecko
mollyibot May 2, 2025
1ebe59e
add libdbus-1-3:i386 according to https://stackoverflow.com/question…
mollyibot May 2, 2025
6bc7bee
updated removing libdbus
mollyibot May 2, 2025
1343f9b
modify presubmit yml
mollyibot May 2, 2025
63396ec
Add dbus
mollyibot May 2, 2025
232c807
Add dbus
mollyibot May 2, 2025
e45a039
modify presubmit yml
mollyibot May 3, 2025
0a1d70c
Change yml file
mollyibot May 5, 2025
678ade5
Remove gtk3
mollyibot May 5, 2025
aa2d0de
Update yml
mollyibot May 5, 2025
82f563c
add new firefox
mollyibot May 6, 2025
fe773e3
add back the firefox local
mollyibot May 6, 2025
3dfe59f
Update webdriver flags with additional --vv
mollyibot May 6, 2025
c6b9208
Update webdriver flags with additional -vv
mollyibot May 6, 2025
9b2d02e
Remove duplicate sudo apt -y update
mollyibot May 6, 2025
7107450
add timeout
mollyibot May 6, 2025
863df83
Upgrade firefox version to 129.0
mollyibot May 6, 2025
bc8f2bb
Modify additional comma
mollyibot May 6, 2025
328cf46
update shasum
mollyibot May 6, 2025
2ed56ba
Set home environment variable
mollyibot May 7, 2025
5fbaac9
set env in json file
mollyibot May 7, 2025
f428d9a
modify yml for scala ubuntu
mollyibot May 7, 2025
2038fe5
Modify the yml to include setup.sh
mollyibot May 7, 2025
bccbd41
include sh in yml
mollyibot May 7, 2025
641624f
Modify yml to include sh
mollyibot May 7, 2025
48d0351
Modify yml to include sh
mollyibot May 7, 2025
de7553f
Modify yml to include sh
mollyibot May 7, 2025
4c20b8a
Modify yml to include sh to include bin bash
mollyibot May 7, 2025
6799aae
Modify yml to include sh to include bin bash
mollyibot May 7, 2025
89662a2
Modify yml to include sh to include bin bash
mollyibot May 7, 2025
f0d4740
Modify yml to include sh to include bin bash
mollyibot May 8, 2025
aec295b
trigger buildkite again
mollyibot May 8, 2025
9e3b057
remove quotes
mollyibot May 8, 2025
80c2204
Testing
mollyibot May 8, 2025
ff336f9
test script
mollyibot May 8, 2025
f7c61cd
add sh setup
mollyibot May 8, 2025
9071f67
change sh file path
mollyibot May 8, 2025
521e55b
Add flags to show more logs
mollyibot May 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 117 additions & 25 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,118 @@
---
platforms:
ubuntu2204:
build_targets:
- "//..."
test_flags:
- "--test_tag_filters=-noci,-external,-native,-sauce"
test_targets:
- "//..."
macos:
build_targets:
- "//..."
test_flags:
- "--test_tag_filters=-noci,-sauce,-external,-native"
test_targets:
- "//..."
windows:
build_flags:
- "--enable_runfiles"
build_targets:
- "//..."
test_flags:
- "--test_tag_filters=-noci,-sauce,-external,-native"
- "--enable_runfiles"
test_targets:
- "//..."
tasks:
web_testing_go_ubuntu2004:
name: "rules_web_testing_go in ubuntu"
platform: ubuntu2004
shell_commands:
- "sh ../setup.sh"
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: ["..."]
test_targets: ["..."]
working_directory: web_testing_go
web_testing_go_macos:
name: "rules_web_testing_go in macos"
platform: macos
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: ["..." ]
test_targets: [ "..." ]
working_directory: web_testing_go
web_testing_go_windows:
name: "rules_web_testing_go in windows"
platform: windows
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_go
web_testing_scala_ubuntu2004:
name: "rules_web_testing_scala in ubuntu"
platform: ubuntu2004
shell_commands:
- "sh ../setup.sh"
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: ["..."]
test_targets: ["..."]
working_directory: web_testing_scala
web_testing_scala_macos:
name: "rules_web_testing_scala in macos"
platform: macos
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_scala
web_testing_scala_windows:
name: "rules_web_testing_scala in windows"
platform: windows
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_scala
web_testing_java_ubuntu2004:
name: "rules_web_testing_java in ubuntu"
platform: ubuntu2004
shell_commands:
- "sh ../setup.sh"
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_java
web_testing_java_macos:
name: "rules_web_testing_java in macos"
platform: macos
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_java
web_testing_java_windows:
name: "rules_web_testing_java in windows"
platform: windows
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_java
web_testing_python_ubuntu2004:
name: "rules_web_testing_python in ubuntu"
platform: ubuntu2004
shell_commands:
- "sh ../setup.sh"
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_python
web_testing_python_macos:
name: "rules_web_testing_python in macos"
platform: macos
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_python
web_testing_python_windows:
name: "rules_web_testing_python in windows"
platform: windows
test_flags:
- "--test_tag_filters=-noci,-sauce"
- "--test_timeout=60"
build_targets: [ "..." ]
test_targets: [ "..." ]
working_directory: web_testing_python
4 changes: 4 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
web_testing_go
web_testing_java
web_testing_python
web_testing_scala
9 changes: 0 additions & 9 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
################################################################################
#
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@python_versions//3.11:defs.bzl", "compile_pip_requirements")

licenses(["notice"]) # Apache 2.0

Expand All @@ -25,11 +24,3 @@ gazelle(
name = "gazelle",
prefix = "github.com/bazelbuild/rules_webtesting",
)

compile_pip_requirements(
name = "requirements",
requirements_in = "requirements.in",
requirements_txt = "requirements_lock.txt",
requirements_windows = "requirements_lock_windows.txt",
)

66 changes: 6 additions & 60 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,26 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")

bazel_dep(name = "platforms", version = "0.0.10")

##### Go dependencies #####
bazel_dep(name = "rules_go", version = "0.51.0-rc1", repo_name = "io_bazel_rules_go")

bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")

go_deps.from_file(go_mod = "//:go.mod")

# All *direct* Go dependencies of the module have to be listed explicitly.
use_repo(
go_deps,
"com_github_gorilla_mux",
"com_github_tebeka_selenium",
)

##### Java dependencies #####
bazel_dep(name = "rules_jvm_external", version = "6.6")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"com.google.guava:guava:33.2.1-jre",
"org.seleniumhq.selenium:selenium-remote-driver:4.27.0",
"org.seleniumhq.selenium:selenium-api:4.27.0",
"junit:junit:4.13.2",
],
)
use_repo(maven, "maven")

##### Python dependencies #####
bazel_dep(name = "rules_python", version = "1.0.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
use_repo(python, "python_3_11", "python_versions")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "rules_webtesting_py_deps",
python_version = "3.11",
requirements_lock = "//:requirements_lock.txt",
requirements_windows = "requirements_lock_windows.txt",
)
use_repo(pip, "rules_webtesting_py_deps")

##### Scala dependencies #####
bazel_dep(name = "rules_scala", repo_name = "io_bazel_rules_scala")

# TODO: Switch to a release version once it's available in BCR.
# Otherwise, the root module has to declare the same override.
git_override(
module_name = "rules_scala",
commit = "219e63983e8e483e66ebf70372969ba227382001",
remote = "https://github.com/mbland/rules_scala",
)

scala_deps = use_extension(
"@io_bazel_rules_scala//scala/extensions:deps.bzl",
"scala_deps",
)
scala_deps.settings(
fetch_sources = True,
)
scala_deps.toolchains(
scalatest = True,
)
use_repo(go_deps, "com_github_gorilla_mux", "com_github_tebeka_selenium")

##### Browsers dependencies #####
browser_repositories = use_extension("//web:extension.bzl", "browser_repositories_extension")

browser_repositories.install(version = "0.3.4")

use_repo(
browser_repositories,
"com_saucelabs_sauce_connect_linux_x64",
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ WebDriver.

## Configure your Bazel project

For all languages, you need to add the following to your MODULE.bazel file:
For each language , you need to add the following to your MODULE.bazel file:

```bzl
bazel_dep(name = "rules_webtesting", version = "0.4.0")
bazel_dep(name = "rules_webtesting_${language}", version = "0.4.0")
```
For example for Java:
```bzl
bazel_dep(name = "rules_webtesting_java", version = "0.4.0")
```

## Write your tests
Expand Down Expand Up @@ -77,7 +81,7 @@ import (
"testing"

"github.com/tebeka/selenium"
"github.com/bazelbuild/rules_webtesting/go/webtest"
"github.com/bazelbuild/rules_web_testing_go/webtest"
)

func TestWebApp(t *testing.T) {
Expand All @@ -100,7 +104,7 @@ In your BUILD files, load the correct language specific build rule and create a
test target using it:

```bzl
load("@rules_webtesting//web:py.bzl", "py_web_test_suite")
load("@rules_web_testing_python//web:py.bzl", "py_web_test_suite")

py_web_test_suite(
name = "browser_test",
Expand Down
3 changes: 0 additions & 3 deletions browsers/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ browser(
browser(
name = "chromium-local",
metadata = "chromium-local.json",
required_tags = [
"native",
],
deps = [
"//go/wsl",
"//third_party/chromedriver",
Expand Down
6 changes: 4 additions & 2 deletions browsers/chromium-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"args" : [
"--headless",
"--no-sandbox",
"--use-gl=swiftshader-webgl"
"--use-gl=swiftshader-webgl",
"--enable-logging=stderr",
"--v=1"
]
},
"google:wslConfig": {
"binary": "%FILE:CHROMEDRIVER%",
"port":"%WSLPORT:WSL%",
"args": ["--port=%WSLPORT:WSL%"],
"args": ["--port=%WSLPORT:WSL%","--verbose"],
"status": true,
"shutdown": true
}
Expand Down
6 changes: 5 additions & 1 deletion browsers/firefox-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@
"args": [
"--port=%WSLPORT:WSL%",
"--host=%WSL:HOST_IP%",
"--marionette-port=%WSLPORT:MARIONETTE%"
"--marionette-port=%WSLPORT:MARIONETTE%",
"-vv"
],
"env": {
"HOME": "%ENV:TEST_TMPDIR%"
},
"status": true,
"shutdown": false
}
Expand Down
2 changes: 1 addition & 1 deletion go/bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ go_library(
name = "go_default_library",
srcs = ["bazel.go"],
importpath = "github.com/bazelbuild/rules_webtesting/go/bazel",
visibility = ["//go:__subpackages__"],
visibility = ["//visibility:public"],
deps = ["//go/cmdhelper:go_default_library"],
)
6 changes: 3 additions & 3 deletions go/metadata/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go_library(
"web_test_files.go",
],
importpath = "github.com/bazelbuild/rules_webtesting/go/metadata",
visibility = ["//go:__subpackages__"],
visibility = ["//visibility:public"],
deps = [
"//go/bazel:go_default_library",
"//go/httphelper:go_default_library",
Expand All @@ -39,7 +39,7 @@ go_test(
"extension_test.go",
"metadata_test.go",
],
data = ["//testdata"],
data = ["@rules_webtesting//testdata"],
embed = [":go_default_library"],
deps = ["//go/bazel:go_default_library"],
deps = ["@rules_webtesting//go/bazel:go_default_library"],
)
32 changes: 32 additions & 0 deletions go/web/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_webtesting//web:web.bzl", "web_test_config")

package(
default_testonly = True,
default_visibility = ["//go:__subpackages__"],
)

bzl_library(
name = "go",
srcs = ["go.bzl"],
deps = [
"@rules_webtesting//web/internal:wrap_web_test_suite",
# should depend on @io_bazel_rules_go//go:def.bzl
],
)
Loading