Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions dotnet/private/dotnet_nunit_test_suite.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ _BROWSERS = {
"ActiveDriverConfig=IE",
],
"data": [],
"tags": ["skip-rbe"],
"tags": [],
"target_compatible_with": ["@platforms//os:windows"],
},
"safari": {
Expand All @@ -89,7 +89,7 @@ _BROWSERS = {
"ActiveDriverConfig=Safari",
],
"data": [],
"tags": ["skip-rbe"],
"tags": [],
"target_compatible_with": ["@platforms//os:osx"],
},
"remote": {
Expand Down
20 changes: 5 additions & 15 deletions java/browsers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ chrome_jvm_flags = select({
"-Dwebdriver.chrome.binary=$(location @mac_chrome//:Chrome.app)/Contents/MacOS/Chrome",
],
"@selenium//common:use_local_chromedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
"//conditions:default": [],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
Expand All @@ -44,9 +42,7 @@ chrome_beta_jvm_flags = select({
"-Dwebdriver.chrome.binary=$(location @mac_beta_chrome//:Chrome.app)/Contents/MacOS/Chrome",
],
"@selenium//common:use_local_chromedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
"//conditions:default": [],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
Expand All @@ -72,9 +68,7 @@ edge_jvm_flags = select({
"-Dwebdriver.edge.binary=\"$(location @mac_edge//:Edge.app)/Contents/MacOS/Microsoft Edge\"",
],
"@selenium//common:use_local_msedgedriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
"//conditions:default": [],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
Expand All @@ -100,9 +94,7 @@ firefox_jvm_flags = select({
"-Dwebdriver.firefox.bin=$(location @mac_firefox//:Firefox.app)/Contents/MacOS/firefox",
],
"@selenium//common:use_local_geckodriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
"//conditions:default": [],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
Expand All @@ -118,9 +110,7 @@ firefox_beta_jvm_flags = select({
"-Dwebdriver.firefox.bin=$(location @mac_beta_firefox//:Firefox.app)/Contents/MacOS/firefox",
],
"@selenium//common:use_local_geckodriver": [],
"//conditions:default": [
"-Dselenium.skiptest=false",
],
"//conditions:default": [],
}) + select({
"@selenium//common:use_headless_browser": [
"-Dwebdriver.headless=true",
Expand Down
25 changes: 13 additions & 12 deletions java/private/selenium_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,49 @@ BROWSERS = {
"jvm_flags": ["-Dselenium.browser=chrome"] + chrome_jvm_flags,
"data": chrome_data,
"tags": COMMON_TAGS + ["chrome"],
"target_compatible_with": [],
},
"chrome-beta": {
"deps": ["//java/src/org/openqa/selenium/chrome"],
"jvm_flags": ["-Dselenium.browser=chrome"] + chrome_beta_jvm_flags,
"data": chrome_beta_data,
"tags": COMMON_TAGS + ["chrome", "chrome-beta"],
"target_compatible_with": [],
},
"edge": {
"deps": ["//java/src/org/openqa/selenium/edge"],
"jvm_flags": ["-Dselenium.browser=edge"] + edge_jvm_flags,
"data": edge_data,
"tags": COMMON_TAGS + ["edge"],
"target_compatible_with": [],
},
"firefox": {
"deps": ["//java/src/org/openqa/selenium/firefox"],
"jvm_flags": ["-Dselenium.browser=ff"] + firefox_jvm_flags,
"data": firefox_data,
"tags": COMMON_TAGS + ["firefox"],
"target_compatible_with": [],
},
"firefox-beta": {
"deps": ["//java/src/org/openqa/selenium/firefox"],
"jvm_flags": ["-Dselenium.browser=ff"] + firefox_beta_jvm_flags,
"data": firefox_beta_data,
"tags": COMMON_TAGS + ["firefox", "firefox-beta"],
"target_compatible_with": [],
},
"ie": {
"deps": ["//java/src/org/openqa/selenium/ie"],
"jvm_flags": ["-Dselenium.browser=ie"] +
select({
"@selenium//common:windows": ["-Dselenium.skiptest=false"],
"@selenium//conditions:default": ["-Dselenium.skiptest=true"],
}),
"jvm_flags": ["-Dselenium.browser=ie"],
"data": [],
"tags": COMMON_TAGS + ["exclusive-if-local", "ie", "skip-rbe"],
"tags": COMMON_TAGS + ["exclusive-if-local", "ie"],
"target_compatible_with": ["@platforms//os:windows"],
},
"safari": {
"deps": ["//java/src/org/openqa/selenium/safari"],
"jvm_flags": ["-Dselenium.browser=safari"] +
select({
"@selenium//common:macos": ["-Dselenium.skiptest=false"],
"@selenium//conditions:default": ["-Dselenium.skiptest=true"],
}),
"jvm_flags": ["-Dselenium.browser=safari"],
"data": [],
"tags": COMMON_TAGS + ["exclusive-if-local", "safari", "skip-rbe"],
"tags": COMMON_TAGS + ["exclusive-if-local", "safari"],
"target_compatible_with": ["@platforms//os:macos"],
},
}

Expand Down Expand Up @@ -114,6 +113,7 @@ def selenium_test(name, test_class, size = "medium", browsers = DEFAULT_BROWSERS
tags = BROWSERS[browser]["tags"] + tags + ([] if test == name else ["no-lint"]),
data = BROWSERS[browser]["data"] + data,
env_inherit = inherited_env,
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
**stripped_args
)
if browser == default_browser:
Expand All @@ -136,6 +136,7 @@ def selenium_test(name, test_class, size = "medium", browsers = DEFAULT_BROWSERS
data = BROWSERS[browser]["data"] + data + [
"@selenium//java/src/org/openqa/selenium/grid:selenium_server",
],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
**stripped_args
)
all_tests.append(":%s-remote" % test)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class NetworkInterceptorRestTest extends JupiterTestBase {
public static void shouldTestBeRunAtAll() {
// Until Firefox can initialise the Fetch domain, we need this check
assumeThat(Browser.detect()).isNotEqualTo(Browser.FIREFOX);
assumeThat(Boolean.getBoolean("selenium.skiptest")).isFalse();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class NetworkInterceptorTest extends JupiterTestBase {
public static void shouldTestBeRunAtAll() {
// Until Firefox can initialise the Fetch domain, we need this check
assumeThat(Browser.detect()).isNotEqualTo(Browser.FIREFOX);
assumeThat(Boolean.getBoolean("selenium.skiptest")).isFalse();
}

@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,11 @@

package org.openqa.selenium.javascript;

import static org.assertj.core.api.Assumptions.assumeThat;

import java.io.IOException;
import org.junit.jupiter.api.BeforeAll;

class ClosureTestSuite extends JavaScriptTestSuite {

public ClosureTestSuite() throws IOException {
super();
}

@BeforeAll
public static void checkShouldRun() {
assumeThat(Boolean.getBoolean("selenium.skiptest")).isFalse();
}
}
7 changes: 0 additions & 7 deletions java/test/org/openqa/selenium/testing/JupiterTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.openqa.selenium.testing;

import static java.util.Objects.requireNonNull;
import static org.assertj.core.api.Assumptions.assumeThat;

import java.net.MalformedURLException;
import java.net.URL;
Expand All @@ -28,7 +27,6 @@
import java.util.logging.Logger;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.openqa.selenium.Capabilities;
Expand Down Expand Up @@ -58,11 +56,6 @@ public abstract class JupiterTestBase {
protected Wait<WebDriver> shortWait;
protected WebDriver localDriver;

@BeforeAll
static void shouldTestBeRunAtAll() {
assumeThat(Boolean.getBoolean("selenium.skiptest")).isFalse();
}

@BeforeEach
final void prepareEnvironment() {
boolean needsSecureServer =
Expand Down
2 changes: 2 additions & 0 deletions py/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ DEFAULT_BROWSER_TESTS = [b for b in BROWSER_TESTS if b != "ie"]
data = BROWSERS[browser]["data"],
env_inherit = ["DISPLAY"],
tags = ["no-sandbox"] + BROWSERS[browser]["tags"],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
deps = [
":init-tree",
":webserver",
Expand Down Expand Up @@ -782,6 +783,7 @@ DEFAULT_BROWSER_TESTS = [b for b in BROWSER_TESTS if b != "ie"]
data = BROWSERS[browser]["data"],
env_inherit = ["DISPLAY"],
tags = ["no-sandbox"] + BROWSERS[browser]["tags"],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
deps = [
":init-tree",
":webserver",
Expand Down
10 changes: 8 additions & 2 deletions py/private/browsers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -73,30 +73,36 @@ BROWSERS = {
"args": ["--driver=chrome"] + chrome_args,
"data": chrome_data,
"tags": COMMON_TAGS + ["chrome"],
"target_compatible_with": [],
},
"chrome-beta": {
"args": ["--driver=chrome"] + chrome_beta_args,
"data": chrome_beta_data,
"tags": COMMON_TAGS + ["chrome"],
"target_compatible_with": [],
},
"edge": {
"args": ["--driver=edge"] + edge_args,
"data": edge_data,
"tags": COMMON_TAGS + ["edge"],
"target_compatible_with": [],
},
"firefox": {
"args": ["--driver=firefox"] + firefox_args,
"data": firefox_data,
"tags": COMMON_TAGS + ["firefox"],
"target_compatible_with": [],
},
"ie": {
"args": ["--driver=ie"],
"data": [],
"tags": COMMON_TAGS + ["ie", "skip-rbe"],
"tags": COMMON_TAGS + ["ie"],
"target_compatible_with": ["@platforms//os:windows"],
},
"safari": {
"args": ["--driver=safari"],
"data": [],
"tags": COMMON_TAGS + ["safari", "skip-rbe"],
"tags": COMMON_TAGS + ["safari"],
"target_compatible_with": ["@platforms//os:macos"],
},
}
6 changes: 1 addition & 5 deletions rb/spec/tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ BROWSERS = {
"ie": {
"data": [],
"deps": ["//rb/lib/selenium/webdriver:ie"],
"tags": [
"skip-rbe", # RBE is Linux-only.
],
"tags": [],
"target_compatible_with": ["@platforms//os:windows"],
"env": {
"WD_REMOTE_BROWSER": "ie",
Expand All @@ -144,7 +142,6 @@ BROWSERS = {
"deps": ["//rb/lib/selenium/webdriver:safari"],
"tags": [
"exclusive-if-local", # Safari cannot run in parallel.
"skip-rbe", # RBE is Linux-only.
],
"target_compatible_with": ["@platforms//os:macos"],
"env": {
Expand All @@ -157,7 +154,6 @@ BROWSERS = {
"deps": ["//rb/lib/selenium/webdriver:safari"],
"tags": [
"exclusive-if-local", # Safari cannot run in parallel.
"skip-rbe", # RBE is Linux-only.
],
"target_compatible_with": ["@platforms//os:macos"],
"env": {
Expand Down
Loading