@@ -180,7 +180,106 @@ Use `git rebase` (not `git merge`) to sync your work from time to time.
180180### Step 5: Test
181181
182182Bug fixes and features ** should have tests** . Look at other tests to
183- see how they should be structured.
183+ see how they should be structured. Verify that new and existing tests are
184+ passing locally before pushing code.
185+
186+ #### Running tests locally
187+
188+ Build your code for the latest changes and run tests locally.
189+
190+ ##### Python
191+ <details >
192+ <summary >
193+ Click to see How to run Python Tests.
194+ </summary >
195+
196+ It's not mandatory to run tests sequentially but running Unit tests
197+ before browser testing is recommended.
198+
199+ Unit Tests
200+ ``` shell
201+ % bazel test //py:unit
202+ ```
203+
204+ Remote Tests
205+ ``` shell
206+ % bazel test --jobs 1 //py:test-remote
207+ ```
208+
209+ Browser Tests
210+ ``` shell
211+ % bazel test //py:test-< browsername> # eg test-chrome, test-firefox
212+ ```
213+ </details >
214+
215+ ##### Javascript
216+ <details >
217+ <summary >
218+ Click to see How to run JavaScript Tests.
219+ </summary >
220+
221+ Node Tests
222+ ``` shell
223+ % bazel test //javascript/node/selenium-webdriver:tests
224+ ```
225+
226+ Firefox Atom Tests
227+ ``` shell
228+ % bazel test --test_tag_filters=firefox //javascript/atoms/... //javascript/selenium-atoms/... //javascript/webdriver/...
229+ ```
230+
231+ Grid UI Unit Tests
232+ ``` shell
233+ % cd javascript/grid-ui && npm install && npm test
234+ ```
235+ </details >
236+
237+ ##### Java
238+ <details >
239+ <summary >
240+ Click to see How to run Java Tests.
241+ </summary >
242+
243+ Small Tests
244+ ``` shell
245+ % bazel test --cache_test_results=no --test_size_filters=small grid java/test/...
246+ ```
247+
248+ Large Tests
249+ ``` shell
250+ % bazel test --cache_test_results=no java/test/org/openqa/selenium/grid/router:large-tests
251+ ```
252+
253+ Browser Tests
254+ ``` shell
255+ bazel test --test_size_filters=small,medium --cache_test_results=no --test_tag_filters=-browser-test //java/...
256+ ```
257+ </details >
258+
259+ ##### Ruby
260+ <details >
261+ <summary >
262+ Click to see How to run Ruby Tests.
263+ </summary >
264+
265+ It's not mandatory to run tests sequentially but running Unit tests
266+ before browser testing is recommended.
267+
268+ Unit Tests
269+ ``` shell
270+ % bazel test rb:unit-test
271+ ```
272+
273+ Chrome Tests
274+ ``` shell
275+ bazel test rb:chrome-test
276+ ```
277+
278+ Remote Tests
279+ ``` shell
280+ % bazel test --test_output=all --test_arg=" -tfocus" --test_arg=" --fail-fast" rb:remote-chrome-test
281+ ```
282+ </details >
184283
185284### Step 6: Push
186285
0 commit comments