If you are having an outbreak you will need a C section or there is a serious chance it can be passed on to your child. The best thing to do is to contact your doctor and tell him about it, your fears and concerns and he will tell you the best thing that you should do.
Some doctors test, others don't. If you have an outbreak near the time of delivery you will need a c-section...otherwise they will need to give you meds like acyclovir or something similiar just before and during labor and delivery in order to prevent the spread to the baby. Babies can contract herpes infection in their eyes and it can lead to blindness. It's VERY important that you let your doc know. I've never heard of herpes spreading to the fetus in utero.
Herpes will not affect baby while in the womb. However, as the others have stated, if you're having an outbreak during delivery you will have a cesarean to avoid passing it onto baby. There are medications you can take that LosingMyMindinGA suggested to help prevent an outbreak if your heart is set on vaginal delivery.
They do test for STDs while pregnant.
So if you contract herpes in early pregnancy, it won't affect the fetus? I have heard that herpes can be asymptomatic for a long time, or the symptoms are mistaken for something else, so what if you have it and never notice an outbreak? How can you be sure not to harm the baby?
Yes it can affect the baby I caught herpes when I first had sex with my now husband and got pregnant a while after but the doctor did explain to me that if you catch herpes early in pregnancy it can be passed to the fetus I honestly don't remember exactly how it happens but I do remember him saying it does happen and if you catch it a few months before your pregnancy or in the 3rd trimester it wont hurt the baby talk to your doctor he can explain it better but yes it can pass to the baby in early stages I got very well informed since i had the std unfortunately!! good luck!!
P.S is you have herpes there a lot you need to know so please talk to your doctor I cried the day I talked to my doctor about the herpes hurting the baby I hated my husband for giving me that because he is only the 3rd guy I have ever been with and i was always very careful but anyways plz talk to your doctor!!!