Server Logging
Submitting results to the acceptor servlet
When a test run is finished, it is possible to configure JsUnit such that it submits the results over HTTP to the JsUnit Server by passing in the query string "submitResults=true" to the JsUnit Test Runner (see Standard query strings). it is submitted to a servlet called "/jsunit/acceptor". The acceptor servlet will receive the results and create an XML document representing the results. (The structure of the XML corresponds to the structure of the XML output from JUnit.) This XML document is written to the logs directory (which by default is jsunit/results/logs, but is configurable in jsunit.properties). The XML document is also returned to the browser.
Below is a sample XML response, from running the JsUnit self tests (jsunit/tests/jsUnitTestSuite.html) with a few tests intentionally broken (testAssertEquals fails, and testAssertNotNull has an error).
Retrieving results from the displayer servlet
Note that the testsuite tag has an attribute named "id". You can retrieve results from past submissions using the servlet named "jsunit/displayer". The displayer servlet expects a query string named "id". For example, in the case below, we could open a browser and hit the URL http://localhost:8080/jsunit/displayer?id=1060383133116. The displayer servlet looks up the result with that ID and returns it to the browser. Note that if the JsUnit Server has been taken down since the run in question was submitted, the displayer will look in the logs directory for the corresponding result.