Skip to content

Commit 55dad42

Browse files
authored
Add instructions on how to run/debug specs in RubyMine (#11339)
1 parent 6b67c0c commit 55dad42

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,25 @@ _Test_Target_ examples:
251251

252252
Optional Environment Variable toggles in test suite:
253253

254-
`ENV['WD_SPEC_DRIVER']` - the driver to test; either the browser name or 'remote' (gets set by Bazel)
255-
`ENV['WD_REMOTE_BROWSER']` - when 'WD_SPEC_DRIVER' is 'remote'; the name of the browser to test (gets set by Bazel)
256-
`ENV['WD_REMOTE_URL']` - url of an already running server to use for remote tests
257-
`ENV['DOWNLOAD_SERVER']` - when `WD_REMOTE_URL` not set; whether to download and use most recently released server version for remote tests
258-
`ENV['DEBUG']` - turns on verbose debugging
259-
`ENV['HEADLESS']` - for chrome, edge and firefox; runs tests in headless mode
260-
`ENV['DISABLE_BUILD_CHECK']` - for chrome and edge; whether to ignore driver and browser version mismatches (allows testing Canary builds)
261-
`ENV['CHROME_BINARY']` - path to test specific Chrome browser
262-
`ENV['EDGE_BINARY']` - path to test specific Edge browser
263-
`ENV['FIREFOX_BINARY']` - path to test specific Firefox browser
254+
- `ENV['WD_SPEC_DRIVER']` - the driver to test; either the browser name or 'remote' (gets set by Bazel)
255+
- `ENV['WD_REMOTE_BROWSER']` - when 'WD_SPEC_DRIVER' is 'remote'; the name of the browser to test (gets set by Bazel)
256+
- `ENV['WD_REMOTE_URL']` - url of an already running server to use for remote tests
257+
- `ENV['DOWNLOAD_SERVER']` - when `WD_REMOTE_URL` not set; whether to download and use most recently released server version for remote tests
258+
- `ENV['DEBUG']` - turns on verbose debugging
259+
- `ENV['HEADLESS']` - for chrome, edge and firefox; runs tests in headless mode
260+
- `ENV['DISABLE_BUILD_CHECK']` - for chrome and edge; whether to ignore driver and browser version mismatches (allows testing Canary builds)
261+
- `ENV['CHROME_BINARY']` - path to test specific Chrome browser
262+
- `ENV['EDGE_BINARY']` - path to test specific Edge browser
263+
- `ENV['FIREFOX_BINARY']` - path to test specific Firefox browser
264+
265+
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:
266+
267+
1. Run `bazel build @bundle//:bundle //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE.
268+
2. Open `rb/` as a main project directory.
269+
3. In <kbd>Settings / Lanugages & Frameworks / Ruby SDK and Gems</kbd> add new <kbd>Interpreter</kbd> pointing to `../bazel-selenium/external/ruby_rules_dist/dist/bin/ruby`.
270+
4. In <kbd>Run / Edit Configurations... / Edit configuration templates... / RSpec</kbd> add `-I ../bazel-bin/rb/lib` to <kbd>Ruby arguments</kbd>.
271+
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.
272+
264273

265274
</details>
266275

0 commit comments

Comments
 (0)