Virginity testing is a traditional practice for the tribes of KwaZulu-Natal province. It supposes to define whether a girl (young woman) leads a sexual life. The procedure is widely criticized and yet, lots of health care experts notice its positive outcomes. The proponents of this practice claim that virginity testing help to reduce the spread of the HIV infection and prevent teenage pregnancy among young women. The opponents insist that this practice violates the basic human rights of privacy and sexual autonomy. The central problem of virginity testing is what outweighs what: its ethical inappropriateness or practical effect.
For the extended explanation of the both positions you can read this paper.