Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legacy command line tools to prevent confusion #6751

Merged
merged 2 commits into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions docs/_running-tests/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ in a browser window. For running larger groups of tests, or running
tests frequently, this is not a practical approach and several better
options exist.

## From the Command Line

The simplest way to run tests is to use the `wpt run` command from the
root of the repository. This will automatically load the tests in the
chosen browser, and extract the test results. For example to run the
`dom/historical.html` tests in a local copy of Chrome:

./wpt run chrome dom/historical.html

Or to run in a specified copy of Firefox:

./wpt run --binary ~/local/firefox/firefox firefox dom/historical.html

On Windows `edge` is also supported, and if you have a sauce labs
account, any browser can be run using product `sauce`. For details on
how to pass information to sauce, including credentials see `./wpt run
--help`. That also details a large number of other options for
customising the test run.


## From Inside a Browser

For running multiple tests inside a browser, there is a test runner
Expand All @@ -24,27 +44,13 @@ more than one reference involved.
Because it runs entirely in-browser, this runner cannot deal with
edge-cases like tests that cause the browser to crash or hang.

## By Automating the Browser

For automated test running designed to be robust enough to use in a CI
environment, the [wptrunner](https://github.com/w3c/wptrunner) test runner
can be used. This is a test runner written in Python and designed to
control the browser from the outside using some remote control
protocol such as WebDriver. This allows it to handle cases such as the
browser crashing that cannot be handled by an in-browser harness. It
also has the ability to automatically run both testharness-based tests
and reftests.

Full instructions for using wptrunner are provided in its own
[documentation](https://wptrunner.readthedocs.org).

## Writing Your Own Runner

Most test runners have two stages: finding all tests, followed by
executing them (or a subset thereof).

To find all tests in the repository, it is **strongly** recommended to
use the included `manifest` tool: the required behaviors are more
use the included `wpt manifest` tool: the required behaviors are more
complex than what are documented (especially when it comes to
precedence of the various possibilities and some undocumented legacy
ways to define test types), and hence its behavior should be
Expand Down
7 changes: 4 additions & 3 deletions docs/_writing-tests/general-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,12 @@ new tests. Any of these rules may be broken if the test demands it:
* Use UNIX-style line endings (i.e. no CR characters at EOL).

We have a lint tool for catching these and other common mistakes. You
can run it manually by starting the `lint` executable from the root of
your local web-platform-tests working directory like this:
can run it manually by starting the `wpt` executable from the root of
your local web-platform-tests working directory, and invoking the
`lint` subcommand, like this:

```
./lint
./wpt lint
```

The lint tool is also run automatically for every submitted pull request,
Expand Down
4 changes: 2 additions & 2 deletions docs/_writing-tests/lint-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: Lint Tool
order: 9
---
We have a lint tool for catching common mistakes in test files. You can run
it manually by starting the `lint` executable from the root of your local
it manually by running the `wpt lint` command from the root of your local
web-platform-tests working directory like this:

```
./lint
./wpt lint
```

The lint tool is also run automatically for every submitted pull request,
Expand Down
11 changes: 0 additions & 11 deletions lint

This file was deleted.

7 changes: 0 additions & 7 deletions manifest

This file was deleted.

6 changes: 3 additions & 3 deletions referrer-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cd ~/web-platform-tests/referrer-policy
git add * && git commit -m "Add generated tests"

# Regenerate the manifest.
../manifest
../wpt manifest

```

Expand Down Expand Up @@ -87,7 +87,7 @@ cd ~/web-platform-tests/referrer-policy
git add * && git commit -m "Remove generated tests"

# Regenerate the manifest.
../manifest
../wpt manifest
```

**Important:**
Expand Down Expand Up @@ -136,7 +136,7 @@ cd ~/web-platform-tests/referrer-policy
git add * && git commit -m "Update generated tests"

# Regenerate the manifest.
../manifest
../wpt manifest


```
Expand Down
5 changes: 0 additions & 5 deletions serve

This file was deleted.

5 changes: 0 additions & 5 deletions wptrun

This file was deleted.