Standard query strings

There are certain query strings that you can pass the Test Runner to tweak its configuration. All query strings are case-insensitive.

The "testPage" query string

The parameter "testpage" is used to inform JsUnit which Test Page to run. For example, entering the URL "d:\jsunit\testRunner.html?testpage=d:\myTests\aTest.html" will launch JsUnit and populate the Test Page box with d:\myTests\aTest.html.

The "autoRun" query string

The parameter "autoRun" is used to inform JsUnit whether to immediately kick off a run. For example, entering the URL "d:\jsunit\testRunner.html?testpage=d:\myTests\aTest.html&autoRun=true" will launch JsUnit and populate the Test Page box with d:\myTests\aTest.html, and immediately kick off the tests. Of course, if you pass autoRun=true, you need to also pass in a testPage.

The "showTestFrame" query string (Internet Explorer only

By default, JsUnit loads Test Pages into a hidden frame. There are some cases, however, where the Test Page runs code that may expect to be run in a visible frame. (This can be particularly true for UI tests.) The parameter "showTestFrame" is used to tell JsUnit whether to make this Test Frame visible. You can pass in showTestFrame=true, in which case JsUnit will show the Test Frame with a default height. You can instead pass in showTestFrame=n, where n is an integer, and JsUnit will show the Test Frame at a height of n pixels.

The "submitResults" query string

The parameter "submitResults" is used to tell JsUnit to submit the results of the next test run. (See JsUnit Server.) If you pass in "submitResults=true", JsUnit will submit the results to the default URL. The default URL is the acceptor servlet running on localhost. If you pass in "submitResults=<url>", JsUnit will submit the results to that URL. For example, you might pass in "submitResults=remotehost:8080/jsunit/acceptor".

The "resultId" query string

The parameter "resultId" is used to tell JsUnit the user-specified ID of the next test run. If the next test run is to be submitted, JsUnit will also submit this ID. (See JsUnit Server.) Of course, resultId is not much use without submitResults=true.

The "debug" query string

You can also instruct JsUnit to be in debug mode when running this Test Page by passing in "debug", that is, using the URL "d:\jsunit\testRunner.html?debug". This debug mode is for JsUnit development - it is not the same as the "debug" trace level.