-
Notifications
You must be signed in to change notification settings - Fork 4
MatrixCustomizationWebTesting
Web testing uses Selenium to proceed though the Grammar Matrix customization questionnaire to test the javascript and cgi scripts. It requires [http://www.mozilla.org/en-US/firefox/fx/ FireFox] and [http://pypi.python.org/pypi/selenium Selenium] on the local system running the tests.
Below are instructions for [#run running], [#add adding], [#maintain maintaining], and [#remove removing] web tests, information for understanding the[#output output], and a description of the [#directory directory structure] of web test modules.
Web tests are run by the "web-test" (short form: "w") command of matrix.py:
python matrix.py web-test
The script will prompt for a patas username and password. This allows the script to remotely install your local code to the [http://uakari.ling.washington.edu/matrix/test/matrix.cgi test page]. The tests will then be run and print the results. You can also use the remote install to confirm any errors produced by the tests.
All the web tests are located in a single module gmcs/web_tests/testWeb.py. There are two ways to add a new web test:
Occasionally something on the web page may change
If a test is no longer of any use to do major changes, the class can be removed by hand or by calling "web-test-remove" (short form "wr"):
python matrix.py web-test-remove [Class Name]
The web tests use the [http://docs.python.org/library/unittest.html unittest] module, so the output is similar to Unit Testing. A dot (.) means the test passed, an "F" means the test failed, and an "E" means there was an error during the test. For F and E, the statements that caused the problem will be displayed, but for "E", the test aborts at that point (no further tests in that method will run).
The tests should provide a reference point for checking investigating bugs, and a method for recreating the error.
Currently all the web tests are located in the module gmcs/web_tests/testWeb.py, and any choices files used by the test should be stored in gmcs/web_tests/web_choices.
gmcs/
web_tests/
testWeb.py
web_choices/
Home | Forum | Discussions | Events