A group B strep test is generally done between weeks 36 and 37 of pregnancy.