Added an option to run test multiple times