Wrap all your tests inside a function.
Call the function when you are ready to run the test.
If you want to restart the test after QUnit completes, then make and call a function like "rerunQUnitTest".
var runAllTest = function(){ test( "test 1", function(){ var a = true; equal( a, true, "function a should return false" ); }); };
source share