Added tests upto q17.
Added debug option to test script.