From d65ac3d66920265f79c0953cded95d2534e0ec34 Mon Sep 17 00:00:00 2001 From: Alex Rodionov Date: Wed, 30 Nov 2022 07:44:14 -0800 Subject: [PATCH 1/2] Add instructions on how to run/debug specs in RubyMine --- README.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1f1a7c3b99297..734149950064f 100644 --- a/README.md +++ b/README.md @@ -251,16 +251,25 @@ _Test_Target_ examples: Optional Environment Variable toggles in test suite: -`ENV['WD_SPEC_DRIVER']` - the driver to test; either the browser name or 'remote' (gets set by Bazel) -`ENV['WD_REMOTE_BROWSER']` - when 'WD_SPEC_DRIVER' is 'remote'; the name of the browser to test (gets set by Bazel) -`ENV['WD_REMOTE_URL']` - url of an already running server to use for remote tests -`ENV['DOWNLOAD_SERVER']` - when `WD_REMOTE_URL` not set; whether to download and use most recently released server version for remote tests -`ENV['DEBUG']` - turns on verbose debugging -`ENV['HEADLESS']` - for chrome, edge and firefox; runs tests in headless mode -`ENV['DISABLE_BUILD_CHECK']` - for chrome and edge; whether to ignore driver and browser version mismatches (allows testing Canary builds) -`ENV['CHROME_BINARY']` - path to test specific Chrome browser -`ENV['EDGE_BINARY']` - path to test specific Edge browser -`ENV['FIREFOX_BINARY']` - path to test specific Firefox browser +- `ENV['WD_SPEC_DRIVER']` - the driver to test; either the browser name or 'remote' (gets set by Bazel) +- `ENV['WD_REMOTE_BROWSER']` - when 'WD_SPEC_DRIVER' is 'remote'; the name of the browser to test (gets set by Bazel) +- `ENV['WD_REMOTE_URL']` - url of an already running server to use for remote tests +- `ENV['DOWNLOAD_SERVER']` - when `WD_REMOTE_URL` not set; whether to download and use most recently released server version for remote tests +- `ENV['DEBUG']` - turns on verbose debugging +- `ENV['HEADLESS']` - for chrome, edge and firefox; runs tests in headless mode +- `ENV['DISABLE_BUILD_CHECK']` - for chrome and edge; whether to ignore driver and browser version mismatches (allows testing Canary builds) +- `ENV['CHROME_BINARY']` - path to test specific Chrome browser +- `ENV['EDGE_BINARY']` - path to test specific Edge browser +- `ENV['FIREFOX_BINARY']` - path to test specific Firefox browser + +If you want to use RubyMine for development, a bit of extra configuration is necessary to let the IDE know about Bazel toolchain and artifacts: + +1. Run `bazel build //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE. +2. Open `rb/` as a main project directory. +3. In Settings / Lanugages & Frameworks / Ruby SDK and Gems add new Interpreter pointing to `../bazel-selenium/external/ruby_rules_dist/dist/bin/ruby`. +4. In Run / Edit Configurations... / Edit configuration templates... / RSpec add `-I ../bazel-bin/rb/lib` to Ruby arguments. +5. You should now be able to run and debug any spec. It uses Chrome by default, but you can alter it using environment variables above. + From b184dc32636a35ff86cd98b325510fb0f83ef981 Mon Sep 17 00:00:00 2001 From: Alex Rodionov Date: Thu, 1 Dec 2022 09:07:17 -0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 734149950064f..91a9d7fb9431d 100644 --- a/README.md +++ b/README.md @@ -264,7 +264,7 @@ Optional Environment Variable toggles in test suite: If you want to use RubyMine for development, a bit of extra configuration is necessary to let the IDE know about Bazel toolchain and artifacts: -1. Run `bazel build //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE. +1. Run `bazel build @bundle//:bundle //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE. 2. Open `rb/` as a main project directory. 3. In Settings / Lanugages & Frameworks / Ruby SDK and Gems add new Interpreter pointing to `../bazel-selenium/external/ruby_rules_dist/dist/bin/ruby`. 4. In Run / Edit Configurations... / Edit configuration templates... / RSpec add `-I ../bazel-bin/rb/lib` to Ruby arguments.