Indonesia has vowed to abolish virginity tests for female civil servants following international outrage that the country's police force continues to use the practice.

Home Affairs Minister Tjahjo Kumolo announced the practice would stop at the Institute of Public Administration, a college for aspiring civil servants and regional administrators, saying it was a "pity" that a woman could fail the test despite being competent for the job, The Bangkok Post reports.

The announcement comes after Human Rights Watch published a scathing report last month on virginity examinations women must undergo before joining Indonesia's police force.

The preliminary requirements for becoming policewoman are that candidates must be aged 17.5 to 22 years, follow a religion, be at least 165cm tall and undergo a health test that includes checking reproductive organs and testing for virginity.

HRW said a number of applicants were only told of the virginity test moments before it was about to take place and were subjected to internal examinations in the company of the other applicants to determine if their hymen was intact.

"Applicants who failed the test were not necessarily expelled from the force, but women described the test as painful and traumatic," said Nisha Varia, associate women's rights director at HRW.

Indonesia's national police said there was no requirement for female candidates to be virgins and the virginity tests allowed them to check candidates were healthy and free of diseases such as cervical cancer.