Made how unittest mode executes tests more robust and customizable