mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-10 10:00:57 +09:00
[browser][docs] Add docs for running tests in different browser (#47109)
* Add documentation on running tests using different Browsers other than chrome. - XHARNESS_COMMAND="test-browser --browser=safari" - Add ability to run against different browsers from the make file target `run-browser-tests` by adding `XHARNESS_BROWSER= ` to command line. At the moment supported values are: - `chrome` - `safari` - `firefox` * Add gecko firefox requirements to testing docs.
This commit is contained in:
parent
598070cc3e
commit
a78f7d2622
2 changed files with 33 additions and 1 deletions
|
@ -28,6 +28,7 @@ PATH=/Users/<your_user>/.jsvu/:$PATH V8
|
|||
### Using Browser Instance
|
||||
It's possible to run tests in a browser instance:
|
||||
|
||||
#### Chrome
|
||||
- An installation of [ChromeDriver - WebDriver for Chrome](https://chromedriver.chromium.org) is required. Make sure to read [Downloads/Version Selection](https://chromedriver.chromium.org/downloads/version-selection) to setup a working installation of ChromeDriver.
|
||||
- Include the [ChromeDriver - WebDriver for Chrome](https://chromedriver.chromium.org) location in your PATH environment. Default is `/Users/<your_user>/.chromedriver`
|
||||
|
||||
|
@ -35,6 +36,15 @@ It's possible to run tests in a browser instance:
|
|||
PATH=/Users/<your_user>/.chromedriver:$PATH
|
||||
```
|
||||
|
||||
#### Gecko / Firefox
|
||||
|
||||
- Requires gecko driver [Github repository of Mozilla](https://github.com/mozilla/geckodriver/releases)
|
||||
- Include the [Github repository of Mozilla](https://github.com/mozilla/geckodriver/releases) location in your PATH environment. Default is `/Users/<your_user>/.geckodriver`
|
||||
|
||||
```bash
|
||||
PATH=/Users/<your_user>/.geckodriver:$PATH
|
||||
```
|
||||
|
||||
## Building Libs and Tests for WebAssembly
|
||||
|
||||
Now we're ready to build everything for WebAssembly (for more details, please read [this document](../../building/libraries/webassembly-instructions.md#building-everything)):
|
||||
|
@ -101,6 +111,26 @@ To run all tests, including "outer loop" tests (which are typically slower and i
|
|||
MSBUILD_ARGS=/p:OuterLoop=true make -C src/mono/wasm/ run-browser-tests-System.AppContext
|
||||
```
|
||||
|
||||
### Running tests using different Browsers
|
||||
It's possible to set a Browser explicitly by adding `--browser=` command line argument to `XHARNESS_COMMAND`:
|
||||
|
||||
- CLI
|
||||
```
|
||||
XHARNESS_COMMAND="test-browser --browser=safari" ./dotnet.sh build /t:Test src/libraries/System.AppContext/tests /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release
|
||||
```
|
||||
|
||||
- Makefile target `run-browser-tests-<test>`
|
||||
|
||||
```
|
||||
XHARNESS_BROWSER=firefox make -C src/mono/wasm/ run-browser-tests-System.AppContext
|
||||
```
|
||||
|
||||
At the moment supported values are:
|
||||
- `chrome`
|
||||
- `safari`
|
||||
- `firefox`
|
||||
|
||||
By default, `chrome` browser is used.
|
||||
|
||||
## Kicking off outer loop tests from GitHub Interface
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue