<commit_before>You can also use Serenity to run your WebDriver tests on a remote machine, such as a Selenium Grid or a remote service such as provided by http://www.saucelabs.com[SauceLabs] or https://www.browserstack.com[BrowserStack]. This allows you to run your web tests against a variety of different browsers and operating systems, and also benefit from faster test execution when running the tests in parallel.

In all cases, you tell Serenity to run tests remotely by using the Selenium Remote driver,

=== Running tests against a Selenium Grid server

https://code.google.com/p/selenium/wiki/Grid2[Selenium Grid] allows you to run tests on a number of remote machines. It is open source, and relatively easy to set up and configure.

To run your Serenity tests on a Selenium Grid, you need to provide the URL of the Selenium Hub using the `webdriver.remote.url` property. You may also want to provide more information about how and where you want to run your tests, using the following properties:
`webdriver.remote.driver`:: What driver to use remotely ('firefox','chrome','iexplore' etc.)
`webdriver.remote.browser.version`:: What version of the remote browser to use
`webdriver.remote.os`:: What operating system the tests should be run on.

For example, if you were running a Selenium Hub locally on port 4444 (the default),

-----
mvn verify -Dwebdriver.remote.url=http://localhost:4444/wd/hub -Dwebdriver.remote.driver=chrome -Dwebdriver.remote.os=WINDOWS
-----

If you are running PhantomJS remotely, you may need to specify what port PhantomJS is to run on using the `phantomjs.webdriver` property.

-----
mvn verify -Dphantomjs.webdriver=5555 -Dwebdriver.remote.url=http://seleniumgrid:4444/wd/hub
-----

You can also pass the usual driver-specific capabilities to the remote browser

-----
mvn verify -Dwebdriver.remote.url=http://localhost:4444/wd/hub -Dwebdriver.remote.driver=chrome -Dwebdriver.remote.os=WINDOWS -Dchrome.switches="--no-sandbox,--ignore-certificate-errors,--homepage=about:blank,--no-first-run"
-----

=== Running tests on SauceLabs
Serenity has special support for running tests on the Cloud-based testing platform http://www.saucelabs.com[SauceLabs]. The general approach is the same as discussed above, but there are a few extra Saucelabs-specific properties:

`saucelabs.url`:: Usually of the form http://<my_id>:<my_API Key>@ondemand.saucelabs.com:80/wd/hu
`saucelabs.target.platform`:: See https://saucelabs.com/platforms/
`saucelabs.driver.version`:: See https://saucelabs.com/platforms/
`saucelabs.test.name`:: The name of the test as it will appear on the Saucelabs site
`saucelabs.access.key`:: Your Saucelabs API key, optional, used to generate links to the Saucelabs results
`saucelabs.user.id`:: Your Saucelabs User ID, optional, used to generate links to the Saucelabs results
`saucelabs.record.screenshots`::Saucelabs records screenshots as well as videos by default. Since Serenity also records screenshots, this feature is disabled by default. It can be reactivated using this system property
`saucelabs.implicit.wait`:: Override the default implicit timeout value for the Saucelabs driver

An example of running tests on Saucelabs is shown here:
---
mvn verify -Dsaucelabs.target.platform=XP -Dwebdriver.driver=chrome -Dsaucelabs.driver.version=26 -Dsaucelabs.url=http://<my_id>:<my_API Key>@ondemand.saucelabs.com:80/wd/hub -Dsaucelabs.access.key=<My_API_Key> -Dsaucelabs.user.id=<my_id> -Dwebdriver.base.url=https://www.website.com -Dmaven.test.failure.ignore=true
---

=== Running tests on BrowserStack

The setup for running tests on BrowserStack is similar to the one for SauceLabs. The following system properties are availbale:

`browserstack.url`:: BrowserStack Hub URL if running the tests on BrowserStack Cloud
`browserstack.os`::
`browserstack.os.version`::
`browserstack.browser`::
`browserstack.browser.version`::
`browserstack.device`:: BrowserStack mobile device name on which tests should be run
`browserstack.device.orientation`:: Set the screen orientation of BrowserStack mobile device
`browserstack.project`:: Specify a name for a logical group of builds on BrowserStack
`browserstack.build`:: Specify a name for a logical group of tests on BrowserStack
`browserstack.session.name`:: Specify an identifier for the test run on BrowserStack
`browserstack.local`:: For Testing against internal/local servers on BrowserStack
`browserstack.debug`::  Generates screenshots at various steps in tests on BrowserStack
`browserstack.resolution`:: Sets resolution of VM on BrowserStack<commit_msg>For saucelabs it should be /hub and small typo.<commit_after>You can also use Serenity to run your WebDriver tests on a remote machine, such as a Selenium Grid or a remote service such as provided by http://www.saucelabs.com[SauceLabs] or https://www.browserstack.com[BrowserStack]. This allows you to run your web tests against a variety of different browsers and operating systems, and also benefit from faster test execution when running the tests in parallel.

In all cases, you tell Serenity to run tests remotely by using the Selenium Remote driver,

=== Running tests against a Selenium Grid server

https://code.google.com/p/selenium/wiki/Grid2[Selenium Grid] allows you to run tests on a number of remote machines. It is open source, and relatively easy to set up and configure.

To run your Serenity tests on a Selenium Grid, you need to provide the URL of the Selenium Hub using the `webdriver.remote.url` property. You may also want to provide more information about how and where you want to run your tests, using the following properties:
`webdriver.remote.driver`:: What driver to use remotely ('firefox','chrome','iexplore' etc.)
`webdriver.remote.browser.version`:: What version of the remote browser to use
`webdriver.remote.os`:: What operating system the tests should be run on.

For example, if you were running a Selenium Hub locally on port 4444 (the default),

-----
mvn verify -Dwebdriver.remote.url=http://localhost:4444/wd/hub -Dwebdriver.remote.driver=chrome -Dwebdriver.remote.os=WINDOWS
-----

If you are running PhantomJS remotely, you may need to specify what port PhantomJS is to run on using the `phantomjs.webdriver` property.

-----
mvn verify -Dphantomjs.webdriver=5555 -Dwebdriver.remote.url=http://seleniumgrid:4444/wd/hub
-----

You can also pass the usual driver-specific capabilities to the remote browser

-----
mvn verify -Dwebdriver.remote.url=http://localhost:4444/wd/hub -Dwebdriver.remote.driver=chrome -Dwebdriver.remote.os=WINDOWS -Dchrome.switches="--no-sandbox,--ignore-certificate-errors,--homepage=about:blank,--no-first-run"
-----

=== Running tests on SauceLabs
Serenity has special support for running tests on the Cloud-based testing platform http://www.saucelabs.com[SauceLabs]. The general approach is the same as discussed above, but there are a few extra Saucelabs-specific properties:

`saucelabs.url`:: Usually of the form http://<my_id>:<my_API Key>@ondemand.saucelabs.com:80/wd/hub
`saucelabs.target.platform`:: See https://saucelabs.com/platforms/
`saucelabs.driver.version`:: See https://saucelabs.com/platforms/
`saucelabs.test.name`:: The name of the test as it will appear on the Saucelabs site
`saucelabs.access.key`:: Your Saucelabs API key, optional, used to generate links to the Saucelabs results
`saucelabs.user.id`:: Your Saucelabs User ID, optional, used to generate links to the Saucelabs results
`saucelabs.record.screenshots`::Saucelabs records screenshots as well as videos by default. Since Serenity also records screenshots, this feature is disabled by default. It can be reactivated using this system property
`saucelabs.implicit.wait`:: Override the default implicit timeout value for the Saucelabs driver

An example of running tests on Saucelabs is shown here:
---
mvn verify -Dsaucelabs.target.platform=XP -Dwebdriver.driver=chrome -Dsaucelabs.driver.version=26 -Dsaucelabs.url=http://<my_id>:<my_API Key>@ondemand.saucelabs.com:80/wd/hub -Dsaucelabs.access.key=<My_API_Key> -Dsaucelabs.user.id=<my_id> -Dwebdriver.base.url=https://www.website.com -Dmaven.test.failure.ignore=true
---

=== Running tests on BrowserStack

The setup for running tests on BrowserStack is similar to the one for SauceLabs. The following system properties are available:

`browserstack.url`:: BrowserStack Hub URL if running the tests on BrowserStack Cloud
`browserstack.os`::
`browserstack.os.version`::
`browserstack.browser`::
`browserstack.browser.version`::
`browserstack.device`:: BrowserStack mobile device name on which tests should be run
`browserstack.device.orientation`:: Set the screen orientation of BrowserStack mobile device
`browserstack.project`:: Specify a name for a logical group of builds on BrowserStack
`browserstack.build`:: Specify a name for a logical group of tests on BrowserStack
`browserstack.session.name`:: Specify an identifier for the test run on BrowserStack
`browserstack.local`:: For Testing against internal/local servers on BrowserStack
`browserstack.debug`::  Generates screenshots at various steps in tests on BrowserStack
`browserstack.resolution`:: Sets resolution of VM on BrowserStack
{'fraction_non_alphanumeric': 0.09234799694356512, 'fraction_numerical': 0.005894552996397773, 'mean_word_length': 5.055518836748182, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1040882', 'n_tokens_mistral': 2716, 'n_tokens_neox': 2615, 'n_words': 1029}