The NY Times Magazine has an interesting article about the history of gender testing among female Olympic athletes. If you want to read it you can find it
here . It's a long article, but here are a few points I found interesting.
-Gender testing was initially instituted for female Olympic athletes to detect men masquerading as women. There's never been a case of this, but what has more commonly been discovered are women who are to some degree intersex. Frequently, what that entails is undescended testes.
-There have been some controversies concerning transwomen competing in female sports recently (among other thing) and the prevalence of intersex female athletes among the Olympic level elite would suggest to some that those women have an unfair advantage because of higher testosterone levels. The article explains how this isn't as black and white as many people assume. According to the article, many intersex women can't utilize the excess testosterone their bodies produce.
-At the same time, the article claims that there isn't conclusive evidence that elevated natural testosterone levels are a competitive advantage in sports. There is currently a measure to prevent athletes in female events from competing if their testosterone levels exceed a certain level, but some women point out that there is no upper limit for men and that genetic advantages are inevitable. Additionally, the gender verification test is actually a series of tests making the definition of " woman" somewhat ... debatable (?)
I thought this was an interesting article. You see a lot of people saying " If it has a dick, it's a dude", but this piece went through the intracacies of why this is such a complex issue. I doubt it will change anyone's mind, but it never hurts to look at new info with an open mind.