Add function testHandler, part function runTests