Perform multiple tests until a solution is found