- From: Sean Owen <srowen@google.com>
- Date: Thu, 6 Sep 2007 11:32:06 +0200
- To: public-mobileok-checker <public-mobileok-checker@w3.org>
Quick review of how to write and run tests: Running tests requires Ant, which is often integrated into IDEs like Eclipse, and is a standard Java tool available from http://ant.apache.org/ Unzip somewhere and place the 'ant' command in your path. >From the project root directory, merely type "ant" to build. Type "ant test" to run the tests. Test cases are located under the "tests/data" directory in the distribution. You will find a directory for each mobileOK test (e.g. PageSizeTest) and a subdirectory for each test case (e.g. "1", "2", "3", etc.). Creating a test is just a matter of creating another such subdirectory. Within the subdirectory, you will need the following: index.xhtml : the document to be tested moki.xml : the expected moki document output from the checker testresults.xml : the expected test results document You may include as many other files as you like, such as stylesheets and images. They will all be served to the checker as expected. Note that for each file 'foo' you can include a companion file called 'foo.headers' which lists the HTTP headers which should be sent when serving that file. This is needed for tests that need to check for particular header values. This is just a text file wherein you write one header name/value pair per line, like: Content-Type: application/xhtml+xml Cache-Control: public That's it -- everything else should be automatic. I will send out updates as I make the improvements we discussed this week. Also, note that it seems most test cases are a little broken at the moment. Sit tight. Sean
Received on Thursday, 6 September 2007 09:32:16 UTC