I'm so sorry about your loss 
I have been through the testing process, but it varies a bit, so my experience might not be the same as yours...
I imagine they are going to do a karotype on your baby, which will make sure they they have the standard 22 chromosomes.
If they find everything is 'normal', then they will have ruled out a genetic or chromosomal problem, and they should refer you on for further tests to see if they can find what is causing your miscarriages.
If they find something wrong, it could be something inherited, or it could be really bad luck.
If it is something inherited, then you and your partner will be referred to see a genetic counsellor, and they will give you both a blood test to see which of you is the carrier of the faulty gene, as well as explain a bit more about what the faulty gene means. Even if you are a carrier, it won't mean every baby you conceive necessarily has the faulty gene as well.
If one of you has a faulty gene, you might qualify for IVF with pre-implantation genetic screening.
This is where they would remove some of your eggs and mix them with your partners sperm in a lab, as per normal IVF. But when the embryos get to be a few cells big, they will remove one cell from each one and perform the genetic test to see which embryos carry the faulty gene. Then only the ones without any problems will be put back into your womb.
This website is really useful www.rarechromo.co.uk/html/home.asp
Good luck with everything 