|
| 1 | +The web-platform-tests Project |
| 2 | +============================== |
| 3 | + |
| 4 | +[](https://community-tc.services.mozilla.com/api/github/v1/repository/web-platform-tests/wpt/master/latest) [](https://github.com/web-platform-tests/wpt/actions?query=workflow%3Adocumentation+branch%3Amaster) [](https://github.com/web-platform-tests/wpt/actions?query=workflow%3Amanifest+branch%3Amaster) [](https://pyup.io/repos/github/web-platform-tests/wpt/) |
| 5 | + |
| 6 | +The web-platform-tests Project is a cross-browser test suite for the |
| 7 | +Web-platform stack. Writing tests in a way that allows them to be run in all |
| 8 | +browsers gives browser projects confidence that they are shipping software that |
| 9 | +is compatible with other implementations, and that later implementations will |
| 10 | +be compatible with their implementations. This in turn gives Web |
| 11 | +authors/developers confidence that they can actually rely on the Web platform |
| 12 | +to deliver on the promise of working across browsers and devices without |
| 13 | +needing extra layers of abstraction to paper over the gaps left by |
| 14 | +specification editors and implementors. |
| 15 | + |
| 16 | +The 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 |
| 39 | +chat room or on the mailing list. |
| 40 | + |
| 41 | +Setting Up the Repo |
| 42 | +=================== |
| 43 | + |
| 44 | +Clone or otherwise get https://github.com/web-platform-tests/wpt. |
| 45 | + |
| 46 | +Note: because of the frequent creation and deletion of branches in this |
| 47 | +repo, it is recommended to "prune" stale branches when fetching updates, |
| 48 | +i.e. use `git pull --prune` (or `git fetch -p && git merge`). |
| 49 | + |
| 50 | +Running the Tests |
| 51 | +================= |
| 52 | + |
| 53 | +See the [documentation website](https://web-platform-tests.org/running-tests/) |
| 54 | +and in particular the |
| 55 | +[system setup for running tests locally](https://web-platform-tests.org/running-tests/from-local-system.html#system-setup). |
| 56 | + |
| 57 | +Command Line Tools |
| 58 | +================== |
| 59 | + |
| 60 | +The `wpt` command provides a frontend to a variety of tools for |
| 61 | +working with and running web-platform-tests. Some of the most useful |
| 62 | +commands 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. |
| 71 | +For 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 | + |
| 76 | +On Windows `wpt` commands must be prefixed with `python` or the path |
| 77 | +to the python binary (if `python` is not in your `%PATH%`). |
| 78 | + |
| 79 | +```bash |
| 80 | +python wpt [command] |
| 81 | +``` |
| 82 | + |
| 83 | +Alternatively, you may also use |
| 84 | +[Bash on Ubuntu on Windows](https://msdn.microsoft.com/en-us/commandline/wsl/about) |
| 85 | +in the Windows 10 Anniversary Update build, then access your windows |
| 86 | +partition from there to launch `wpt` commands. |
| 87 | + |
| 88 | +Please make sure git and your text editor do not automatically convert |
| 89 | +line endings, as it will cause lint errors. For git, please set |
| 90 | +`git config core.autocrlf false` in your working tree. |
| 91 | + |
| 92 | +Publication |
| 93 | +=========== |
| 94 | + |
| 95 | +The master branch is automatically synced to [wpt.live](https://wpt.live/) and |
| 96 | +[w3c-test.org](https://w3c-test.org/). |
| 97 | + |
| 98 | +Contributing |
| 99 | +============ |
| 100 | + |
| 101 | +Save the Web, Write Some Tests! |
| 102 | + |
| 103 | +Absolutely everyone is welcome to contribute to test development. No |
| 104 | +test is too small or too simple, especially if it corresponds to |
| 105 | +something for which you've noted an interoperability bug in a browser. |
| 106 | + |
| 107 | +The way to contribute is just as usual: |
| 108 | + |
| 109 | +* Fork this repository (and make sure you're still relatively in sync |
| 110 | + with it if you forked a while ago). |
| 111 | +* Create a branch for your changes: |
| 112 | + `git checkout -b topic`. |
| 113 | +* Make your changes. |
| 114 | +* Run `./wpt lint` as described above. |
| 115 | +* Commit locally and push that to your repo. |
| 116 | +* Create a pull request based on the above. |
| 117 | + |
| 118 | +Issues with web-platform-tests |
| 119 | +------------------------------ |
| 120 | + |
| 121 | +If you spot an issue with a test and are not comfortable providing a |
| 122 | +pull request per above to fix it, please |
| 123 | +[file a new issue](https://github.com/web-platform-tests/wpt/issues/new). |
| 124 | +Thank you! |
0 commit comments