You can achieve this with QUnit callbacks . They are called at several different points during the execution of the tests (for example, before each test, after each module, ...)
Here is an example from my test suite:
QUnit.begin = function() { console.log('####'); }; QUnit.testStart = function(test) { var module = test.module ? test.module : ''; console.log('#' + module + " " + test.name + ": started."); }; QUnit.testDone = function(test) { var module = test.module ? test.module : ''; console.log('#' + module + " " + test.name + ": done."); console.log('####'); };
He puts this in a file called helper.js and includes it in the test.html page.
It produces a conclusion as follows:
#### #kort-Availability Includes: started. #kort-Availability Includes: done. #### #kort-UrlLib Constructor: started. #kort-UrlLib Constructor: done. #### #kort-UrlLib getCurrentUrl: started. #kort-UrlLib getCurrentUrl: done. ####
source share