Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions on how to run/debug specs in RubyMine #11339

Merged
merged 2 commits into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 @bundle//:bundle //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE.
2. Open `rb/` as a main project directory.
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`.
4. In <kbd>Run / Edit Configurations... / Edit configuration templates... / RSpec</kbd> add `-I ../bazel-bin/rb/lib` to <kbd>Ruby arguments</kbd>.
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.


</details>

Expand Down