@@ -204,7 +204,7 @@ twine upload bazel-bin/py/selenium-*.whl bazel-bin/py/selenium-*.tar.gz
204
204
<details >
205
205
<summary >Click to see Ruby Build Steps</summary >
206
206
207
- To build the Ruby code run:
207
+ To build all Ruby code run:
208
208
209
209
``` sh
210
210
bazel build //rb/...
@@ -213,26 +213,21 @@ bazel build //rb/...
213
213
To run unit tests:
214
214
215
215
``` sh
216
- bazel test --cache_test_results=no --test_output=all //rb:unit-test
216
+ bazel test //rb:unit-test
217
217
```
218
218
219
- To run tests on a browser:
219
+ To run tests on a specific browser:
220
220
221
221
``` sh
222
- bazel test --cache_test_results=no --test_output=all //rb:< browsername> -test
222
+ bazel test //rb:< browsername> -test
223
223
```
224
224
225
- To run remote tests on a browser:
225
+ To run remote tests on a specific browser:
226
226
227
227
``` sh
228
- bazel test --cache_test_results=no --test_output=all //rb:remote-< browsername> -test
228
+ bazel test //rb:remote-< browsername> -test
229
229
```
230
230
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
- ```
236
231
_ browsername_ :
237
232
* chrome
238
233
* edge
@@ -241,15 +236,21 @@ _browsername_:
241
236
* safari
242
237
* safari-preview
243
238
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
+
244
245
_ Test_Target_ examples:
245
246
* Selenium::WebDriver::Devtools
246
247
* Selenium::WebDriver::TakesScreenshot
247
248
* Selenium::WebDriver::Timeouts
248
249
* Selenium::WebDriver::Chrome::Driver
249
250
* Selenium::WebDriver::Firefox::Profile
250
- * Selenium::Webdriver::Remote::Driver
251
+ * Selenium::Webdriver::Remote::Driver
251
252
252
- Optional Environment Variable toggles in test suite:
253
+ Available Environment Variable toggles in test suite:
253
254
254
255
- ` ENV['WD_SPEC_DRIVER'] ` - the driver to test; either the browser name or 'remote' (gets set by Bazel)
255
256
- ` 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:
262
263
- ` ENV['EDGE_BINARY'] ` - path to test specific Edge browser
263
264
- ` ENV['FIREFOX_BINARY'] ` - path to test specific Firefox browser
264
265
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
+
265
271
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
272
267
273
1 . Run ` bazel build @bundle//:bundle //rb:selenium-devtools //rb:selenium-webdriver ` before configuring IDE.
0 commit comments