1The web-platform-tests Project
2==============================
3
4[![Taskcluster CI Status](https://community-tc.services.mozilla.com/api/github/v1/repository/web-platform-tests/wpt/master/badge.svg)](https://community-tc.services.mozilla.com/api/github/v1/repository/web-platform-tests/wpt/master/latest) [![documentation](https://github.com/web-platform-tests/wpt/workflows/documentation/badge.svg)](https://github.com/web-platform-tests/wpt/actions?query=workflow%3Adocumentation+branch%3Amaster) [![manifest](https://github.com/web-platform-tests/wpt/workflows/manifest/badge.svg)](https://github.com/web-platform-tests/wpt/actions?query=workflow%3Amanifest+branch%3Amaster) [![Python 3](https://pyup.io/repos/github/web-platform-tests/wpt/python-3-shield.svg)](https://pyup.io/repos/github/web-platform-tests/wpt/)
5
6The web-platform-tests Project is a cross-browser test suite for the
7Web-platform stack. Writing tests in a way that allows them to be run in all
8browsers gives browser projects confidence that they are shipping software that
9is compatible with other implementations, and that later implementations will
10be compatible with their implementations. This in turn gives Web
11authors/developers confidence that they can actually rely on the Web platform
12to deliver on the promise of working across browsers and devices without
13needing extra layers of abstraction to paper over the gaps left by
14specification editors and implementors.
15
16The most important sources of information and activity are:
17
18- [github.com/web-platform-tests/wpt](https://github.com/web-platform-tests/wpt):
19  the canonical location of the project's source code revision history and the
20  discussion forum for changes to the code
21- [web-platform-tests.org](https://web-platform-tests.org): the documentation
22  website; details how to set up the project, how to write tests, how to give
23  and receive peer review, how to serve as an administrator, and more
24- [wpt.live](https://wpt.live): a public deployment of the test suite,
25  allowing anyone to run the tests by visiting from an
26  Internet-enabled browser of their choice
27- [wpt.fyi](https://wpt.fyi): an archive of test results collected from an
28  array of web browsers on a regular basis
29- [Real-time chat room](https://app.element.io/#/room/#wpt:matrix.org): the
30  `wpt:matrix.org` matrix channel; includes participants located
31  around the world, but busiest during the European working day.
32- [Mailing list](https://lists.w3.org/Archives/Public/public-test-infra/): a
33  public and low-traffic discussion list
34- [RFCs](https://github.com/web-platform-tests/rfcs): a repo for requesting
35  comments on substantial changes that would impact other stakeholders or
36  users; people who work on WPT infra are encouraged to watch the repo.
37
38**If you'd like clarification about anything**, don't hesitate to ask in the
39chat room or on the mailing list.
40
41Setting Up the Repo
42===================
43
44Clone or otherwise get https://github.com/web-platform-tests/wpt.
45
46Note: because of the frequent creation and deletion of branches in this
47repo, it is recommended to "prune" stale branches when fetching updates,
48i.e. use `git pull --prune` (or `git fetch -p && git merge`).
49
50Running the Tests
51=================
52
53See the [documentation website](https://web-platform-tests.org/running-tests/)
54and in particular the
55[system setup for running tests locally](https://web-platform-tests.org/running-tests/from-local-system.html#system-setup).
56
57Command Line Tools
58==================
59
60The `wpt` command provides a frontend to a variety of tools for
61working with and running web-platform-tests. Some of the most useful
62commands are:
63
64* `wpt serve` - For starting the wpt http server
65* `wpt run` - For running tests in a browser
66* `wpt lint` - For running the lint against all tests
67* `wpt manifest` - For updating or generating a `MANIFEST.json` test manifest
68* `wpt install` - For installing the latest release of a browser or
69  webdriver server on the local machine.
70* `wpt serve-wave` - For starting the wpt http server and the WAVE test runner.
71For more details on how to use the WAVE test runner see the [documentation](./tools/wave/docs/usage/usage.md).
72
73<span id="windows-notes">Windows Notes</span>
74=============================================
75
76On Windows `wpt` commands must be prefixed with `python` or the path
77to the python binary (if `python` is not in your `%PATH%`).
78
79```bash
80python wpt [command]
81```
82
83Alternatively, you may also use
84[Bash on Ubuntu on Windows](https://msdn.microsoft.com/en-us/commandline/wsl/about)
85in the Windows 10 Anniversary Update build, then access your windows
86partition from there to launch `wpt` commands.
87
88Please make sure git and your text editor do not automatically convert
89line endings, as it will cause lint errors. For git, please set
90`git config core.autocrlf false` in your working tree.
91
92Publication
93===========
94
95The master branch is automatically synced to [wpt.live](https://wpt.live/) and
96[w3c-test.org](https://w3c-test.org/).
97
98Pull requests are
99[automatically mirrored](https://w3c-test.org/submissions/) except those
100that modify sensitive resources (such as `.py`). The latter require
101someone with merge access to comment with "LGTM" or "w3c-test:mirror" to
102indicate the pull request has been checked.
103
104Contributing
105============
106
107Save the Web, Write Some Tests!
108
109Absolutely everyone is welcome to contribute to test development. No
110test is too small or too simple, especially if it corresponds to
111something for which you've noted an interoperability bug in a browser.
112
113The way to contribute is just as usual:
114
115* Fork this repository (and make sure you're still relatively in sync
116  with it if you forked a while ago).
117* Create a branch for your changes:
118  `git checkout -b topic`.
119* Make your changes.
120* Run `./wpt lint` as described above.
121* Commit locally and push that to your repo.
122* Create a pull request based on the above.
123
124Issues with web-platform-tests
125------------------------------
126
127If you spot an issue with a test and are not comfortable providing a
128pull request per above to fix it, please
129[file a new issue](https://github.com/web-platform-tests/wpt/issues/new).
130Thank you!
131