Skip to content

Commit 251d3b8

Browse files
committed
[rb] update build instructions in README
1 parent b9e14d1 commit 251d3b8

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

README.md

+19-13
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ twine upload bazel-bin/py/selenium-*.whl bazel-bin/py/selenium-*.tar.gz
204204
<details>
205205
<summary>Click to see Ruby Build Steps</summary>
206206

207-
To build the Ruby code run:
207+
To build all Ruby code run:
208208

209209
```sh
210210
bazel build //rb/...
@@ -213,26 +213,21 @@ bazel build //rb/...
213213
To run unit tests:
214214

215215
```sh
216-
bazel test --cache_test_results=no --test_output=all //rb:unit-test
216+
bazel test //rb:unit-test
217217
```
218218

219-
To run tests on a browser:
219+
To run tests on a specific browser:
220220

221221
```sh
222-
bazel test --cache_test_results=no --test_output=all //rb:<browsername>-test
222+
bazel test //rb:<browsername>-test
223223
```
224224

225-
To run remote tests on a browser:
225+
To run remote tests on a specific browser:
226226

227227
```sh
228-
bazel test --cache_test_results=no --test_output=all //rb:remote-<browsername>-test
228+
bazel test //rb:remote-<browsername>-test
229229
```
230230

231-
To run a particular test on a browser:
232-
233-
```sh
234-
bazel test --cache_test_results=no --test_output=all --test_arg="-e<Test_Target>" //rb:<browsername>-test
235-
```
236231
_browsername_:
237232
* chrome
238233
* edge
@@ -241,15 +236,21 @@ _browsername_:
241236
* safari
242237
* safari-preview
243238

239+
Commonly used bazel command line arguments:
240+
* Always run all tests - `--cache_test_results=no`
241+
* Display stdout at the end of the test run - `--test_output=all`
242+
* Run a specific test - `--test_arg="-e<Test_Target>"` (see examples below)
243+
* Run with an environment variable - `--test_env=MYENV=myvalue` (see examples below)
244+
244245
_Test_Target_ examples:
245246
* Selenium::WebDriver::Devtools
246247
* Selenium::WebDriver::TakesScreenshot
247248
* Selenium::WebDriver::Timeouts
248249
* Selenium::WebDriver::Chrome::Driver
249250
* Selenium::WebDriver::Firefox::Profile
250-
* Selenium::Webdriver::Remote::Driver
251+
* Selenium::Webdriver::Remote::Driver
251252

252-
Optional Environment Variable toggles in test suite:
253+
Available Environment Variable toggles in test suite:
253254

254255
- `ENV['WD_SPEC_DRIVER']` - the driver to test; either the browser name or 'remote' (gets set by Bazel)
255256
- `ENV['WD_REMOTE_BROWSER']` - when 'WD_SPEC_DRIVER' is 'remote'; the name of the browser to test (gets set by Bazel)
@@ -262,6 +263,11 @@ Optional Environment Variable toggles in test suite:
262263
- `ENV['EDGE_BINARY']` - path to test specific Edge browser
263264
- `ENV['FIREFOX_BINARY']` - path to test specific Firefox browser
264265

266+
To run with a specific version of Ruby you can change the version in `rb/ruby_version.bzl` or from command line:
267+
```sh
268+
echo 'RUBY_VERSION = <X.Y.Z>' > rb/ruby_version.bzl
269+
```
270+
265271
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:
266272

267273
1. Run `bazel build @bundle//:bundle //rb:selenium-devtools //rb:selenium-webdriver` before configuring IDE.

0 commit comments

Comments
 (0)