Add preconditions for run test on travis