Add documentation for writing new tests.

This commit is contained in:
Josh Matthews 2015-10-22 09:52:34 -04:00
parent 2de5407cda
commit 29cdab217f

View file

@ -96,6 +96,26 @@ log is saved, run from the root directory:
For CSSWG tests a similar prcedure works, with `./mach test-css` and
`./mach update-css`.
Writing new tests
=================
The simplest way to create a new test is to use the following command:
./mach create-wpt tests/wpt/path/to/new/test.html --no-run
This will create test.html in the appropriate directory using the WPT
template for JavaScript tests. To create a new reference test instead,
use the following:
./mach create-wpt --reftest tests/wpt/path/to/new/reftest.html --no-run --reference tests/wpt/path/to/reference.html
`reference.html` will be created if it doesn't not exist, and `reftest.html`
will be created using the WPT reftest template. These new tests can then
be run in the following manner like any other WPT test:
./mach test-wpt tests/wpt/path/to/new/test.html
./mach test-wpt tests/wpt/path/to/new/reftest.html
Editing tests
=============