/******************************************************************************* * UsingJsUnit.txt * Component of the JSUnit-based test suite for the OpenAjax Hub. * * This file explains how to set up JSUnit and Ant. * (These instructions need to be updated and beefed up.) * * Copyright 2006-2007 OpenAjax Alliance * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless * required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ******************************************************************************/ Using jsunit (http://www.jsunit.net/): You can run unit tests from the ant build script, or from "jsunit/testRunner.html". Running from testRunner.html: Just open the file in a browser and browse for a unit test - an HTML file starting with _Test in the testsrc directory and press "run". If you set the level to "info" you will also see some trace messages in a second window. Running from ant: The build.xml file in the hub trunk contains a "tests" target. You will need ant installed. (I use 1.6.2). This will launch a server and automatically run through any tests defined in "testsrc/TestSuite.html". You can edit the "testsrs/jsunit-server-properties.xml" file to test in multiple browsers or set up other options. (I can not figure out a way to set the tracing level while running though ant)