an apparatus to test gngr.
We are just getting started. We are currently trying to run the css2.1 test suite. More test-suites are planned for the future.
The test code uses the WebDriver protocol to navigate and screenshot the browser. The screenshots for the test and its reference are then compared.
On gngr side, we are implementing a subset of the WebDriver protocol and will then run grinder against it.
git clonethis repo.- Download the CSS2.1 testsuite from w3c. We use the
nightly-unstablepackage and unzip it into the root folder of this repo. - Setup sbt
- Run a local server on port 8000 in the root folder of this repo. Example:
python -m SimpleHTTPServer.
sbt run prepare
This will parse and filter the tests from the css2.1 reference TOC. The details of the filtered tests are then
stored in data/test-cases.xml.
sbt run compare <browser-name> <auth-key-for-gngr>
where browser-name can be either firefox or gngr.
This will open a new browser window, navigate to the tests and their references, screenshot them and compare the images.
When running with gngr, you need to set it up first:
- Start
gngrwith the-grinder-key=xyzflag (substitutexyzwith any key of your choice). - Provide the same key to the grinder run. For example:
sbt run compare gngr xyz
touch pause
in this repo root will cause tests to pause.