Optimizing tests runtime