This is an old poll, but the issue pops up again and again, so I'm going to post anyway.
From what I have been able to gather, these "medical tests" to detect being gay rely on one of two methods: 1) attempting to detect "DNA degradation", or 2) attempting to detect prolapsed rectums. Both of these approaches have serious flaws.
For 1) the method used to detect DNA "degradation" is invalid, and being gay isn't associated with any such degradation. There are epigenetic factors that may be associated with being gay, but the sophisticated methods required to determine if an individual has those markers is far, far, far more complex and expensive than the simple reagents used in the invalid degradation test. Not to mention that the epigenetics are themselves up for scientific debate.
The flaw with 2) is that while prolapsed rectums certainly exist, and it is also true that certain sexual practices can lead to a prolapsed rectum if taken to extremes, simple anal sex isn't one of them. The reason is fairly obvious: stools and dicks are about the same size. Funny that, huh? Almost as if the opening & appendage evolved to fit.
Not only that, but prolapsed rectums happen for other reasons too, so using this as a proxy for being gay will result in a high false-positive rate. The false-positive rate is a real concern for any test conducted in a medical setting. I hesitate to call these medical tests.
But not all gay men even like anal sex. So, even if examining the rectum could tell you if someone was having anal sex, that would still miss a large fraction of gay men. So such a test would necessarily have a high false negative rate as well.
In medical terms then, these "tests" don't detect the quality they are testing for, are insensitive, have high false positive rates, and yet are to be used to make judicial decisions.
Ironically, there is a test that would likely work: a pupil reaction test. In such a test, the subject is shown heteroerotic and homoerotic images while their pupil size is monitored. Heterosexual people react differently than homosexual people than bisexual people to these tests.
The problem with such an accurate, supported by science test (aside from its horrible invasion of privacy,) is that it would be deemed unacceptably offensive by the very nations who would be tempted to administer it.
They would also uncover people who are vehemently and violently anti-homosexual, but who are indeed homosexual themselves. That might prove awkward.
A complete and totally honest medical history could suggest if someone was gay. But, who would give such a history during an interview with these clowns?
~~~~~~~~~~~~~~~~~
The notion that homosexuals need to be protected from themselves sounds nifty* until you realize that the tests themselves are completely bogus, and so do nothing to really screen gay people out. Also, I don't really trust the benevolent intentions of a state that would punish my state of being with a death penalty. Nor is that attitude consistent with how they treat their native gay citizens, who by definition, were born there. These regulations come from animus, nothing more. Because these countries are sovereign states, what we can do is limited. Trying to justify their actions beyond that makes no sense to me.
* Except for the question of why we need to be "protected" by harassment, but the hets can continue to do whatever the fuck they want, as they always have.
~~~~~~~~~~~~~~~~~
Saying that the people in these countries should be able to decide if homosexuals can enter sounds very democracy-like and all. Except that the very countries most likely to impose such "tests" are the countries with the least democratic form of government possible: monarchies. People in Saudi Arabia have no say in what becomes law in their country. At all.
OTOH, Kuwait has a parliamentary constitutional monarchy, where the people do have a much greater say in the laws. Yet, even they likely have no say in immigration policies. How can I say that? Because it was only in the Immigration Act of 1990 (19 freaking 90) that the US Congress withdrew the phrase "sexual deviation" so that there were no longer medical grounds to bar gay people from entry to the United States. So even in America, the people never voted directly on any Immigration Act. The best we can do is vote for candidates who we hope will vote the way we want when such bills come up.