The "foam" is the sperm,(i'm wrong it's not sperm, it just helps the sperm along through to the females ovaries) I've tried to extract this from my questionable quails, and must have done it wrong because all i got was pooed on.
I just read how to do the foam test, I did it wrong the first time I tried im going to do it again now that I've read a way to do it and see if it's right (now that I do know who are the males it shouldnt be hard to do).
I read to put the bird upside down in the palm of your hand and gently press back on the quails tail, you should see foam coming from the vent. According to what i read. I can't post it though because its' from another forum...and i read that that's not allowed.
Technically females are supposed to be larger than the males, but why risk keeping a runt female as your breeding male? Another way to tell is to band anyone who starts calling as a male. This is fine to do in smaller groups, but it can be more tricky in flocks of 50-100+
Once the quail are 6-8 weeks old you should be able to vent sex them. In order to vent sex, hold the quail upside down with its vent facing away from you. Gently squeeze and massage the lower stomach, working your way closer to the tail. Males "foam up" while female vents remain clean.
This only works once they have reached breeding age, and the older the quail the more foam you'll see. Practice doing this on a guaranteed male and a guaranteed female to see the difference. Once you feel comfortable with the difference then try it out on the unknowns.
If you like the color then when they are sexed is no big deal - breeding age is also eating age (although you don't get those extra few weeks of fattening them up like you do with other colors).