since it is the main cause for divorce, ,unless the veracity of the allegation of 'impotency' is proved,how to proceed further? as such ,i still believe that the court can direct for such tests?
it is not like narco analysis,wherein the results are not prooved 100% correct.
with regards to madness, help of psychiatrics could be sought if needed depending upon the merit and need of the case .
similarly,in the instant case,how could the court or any person come to the conclusion where the allegation is true or false?since the 'potency' of the partners is one of the most important factors in marrital life,it is a serious issue and I do not see any 'immorality' in undergoing the test in the given circumstances.