mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Added new doc for running test in chrome
This commit is contained in:
parent
8141ced2fd
commit
fb0aa8d132
@ -84,6 +84,8 @@ In order to run specific tests only, use their feature file name:
|
|||||||
|
|
||||||
This will start a Firefox browser by default. Other browsers and profiles can be configured in `behat.yml`.
|
This will start a Firefox browser by default. Other browsers and profiles can be configured in `behat.yml`.
|
||||||
|
|
||||||
|
For example, if you want to start a Chrome Browser you can following the instructions provided [here](docs/chrome-behat.md).
|
||||||
|
|
||||||
## Tutorial
|
## Tutorial
|
||||||
|
|
||||||
See [docs/tutorial.md](docs/tutorial.md)
|
See [docs/tutorial.md](docs/tutorial.md)
|
||||||
|
30
docs/chrome-behat.md
Normal file
30
docs/chrome-behat.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#Running Behat Tests using Chrome
|
||||||
|
If you would like to run Behat Tests using Google Chrome here are a few steps I went through to get that setup.
|
||||||
|
|
||||||
|
1) [Download the Google Chrome Webdriver](http://chromedriver.storage.googleapis.com/index.html?path=2.8/)
|
||||||
|
|
||||||
|
2) Unzip the file, and place the chromedriver file in a known location.
|
||||||
|
|
||||||
|
3) Now edit the `behat.yml` file and create a new profile for using Chrome by adding the following below the default profile.
|
||||||
|
|
||||||
|
```
|
||||||
|
default_session: selenium2
|
||||||
|
javascript_session: selenium2
|
||||||
|
goutte: ~
|
||||||
|
selenium2:
|
||||||
|
browser: chrome
|
||||||
|
SilverStripe\BehatExtension\Extension:
|
||||||
|
screenshot_path: %behat.paths.base%/_artifacts/screenshots
|
||||||
|
```
|
||||||
|
|
||||||
|
4) Now we need to use the new webdriver with Selenium.
|
||||||
|
|
||||||
|
```
|
||||||
|
java -jar selenium-server.jar -Dwebdriver.chrome.driver="/path/to/chromedriver"
|
||||||
|
```
|
||||||
|
|
||||||
|
5) Now run your behat steps with the chrome profile.
|
||||||
|
|
||||||
|
```
|
||||||
|
behat @mysite --profile=chrome
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user