Debug tests

It is possible to debug your tests  based on the stack trace printed out in the BladeRunnerJS console window when running the tests. However, sometimes more investigation is required.

To debug your tests place a debugger statement at the appropriate position within your code. Then start the JsTestDriver server, with the following command: brjs test-server

This starts the server and launches the default browser, as defined in browser configuration file test-runner.conf.  This command does not run any tests, but as the browser window is already open, it will not close at the end of the test run. This gives you the opportunity to open the debug window in the browser. You may then execute the tests in the usual manner from another command prompt window. The browsers interactive debugger will activate, and your investigations can continue. brjs test ..\apps\fxtrader\fxtrader-bladeset\blades\myblade UTs

The script detects the server is already running and runs the tests in the existing browser window.