Commit 265fc0fe authored by John Chen's avatar John Chen Committed by Commit Bot

[ChromeDriver] Add info on WPT WebDriver tests

NOTRY=True
TBR=wenbinzhang@google.com

Change-Id: Ib644820981abd902cb6372d3008c1ee0b372b9d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288100Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787629}
parent aa8bf3d3
...@@ -126,7 +126,59 @@ The Web Platform Tests (WPT) project is a W3C-coordinated attempt to build a ...@@ -126,7 +126,59 @@ The Web Platform Tests (WPT) project is a W3C-coordinated attempt to build a
cross-browser testsuit to verify how well browsers conform to web platform cross-browser testsuit to verify how well browsers conform to web platform
standards. Here, we will only focus on the WebDriver portion of WPT. standards. Here, we will only focus on the WebDriver portion of WPT.
TODO: Add details. To run WPT WebDriver tests, first clone the tests from GitHub into an empty
directory:
```
git clone https://github.com/web-platform-tests/wpt
```
If necessary, install Python `virtualenv` module on your system.
This only needs to be done once. The command for the installation depends on
your system, but is usually something like:
```
pip install virtualenv
```
Now you can change into the WPT repository location,
and run WPT WebDriver tests with the following command:
```
./wpt run [options] chrome webdriver
```
Use `./wpt run --help` to see all available options.
The following are the most useful options:
* `--webdriver-binary /path/to/chromedriver` specifies the ChromeDriver binary
to use. Without this option, the test runner will try to find ChromeDriver on
your PATH, or download ChromeDriver if it is not already on the PATH.
* `--binary /path/to/chrome` specifies the Chrome binary to use.
* `--webdriver-arg=...` specifies additional arguments to be passed to the
ChromeDriver command line. For example, to create a ChromeDriver verbose log,
use `--webdriver-arg=--verbose --webdriver-arg=--log-path=/path/to/log
--webdriver-arg=--append-log`. Note the following:
* Each ChromeDriver switch needs a separate `--webdriver-arg`.
Don't concatenate multiple switches together.
* Each ChromeDriver switch must be connected with `--webdriver-arg` with
an `=` sign.
* `--webdriver-arg=--append-log` is recommended.
Sometimes the test runner needs to restart ChromeDriver during tests,
and this can cause ChromeDriver to overwrite logs without this switch.
* `--log-wptreport /path/to/report` generates a test report in JSON format.
The test runner always displays test failures on the screen, but it is often
useful to generate a test log as well. Many log formats are available,
see WPT help for all options.
The WPT WebDriver tests are organized into subdirectories, one for each
WebDriver command defined in the W3C spec. You can select a subset of the tests
with the last argument on the WPT command line. For example, to run all tests
for the New Session command, use
```
./wpt run [options] chrome webdriver/tests/new_session
```
## JavaScript Unit Tests ## JavaScript Unit Tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment