If you're accused of a sex crime, the last thing you'll want to have describe your innocence or guilt is a psychological test. Tests are not infallible, and they simply can't replace hard evidence of a crime.
One test, referred to as the Abel Assessment for Sexual Interest, is used to help decide the fate of people accused of sexually abusing children. The test itself can help determine if the person is low or high risk when around a child, and it can be used during custody battles or criminal trials.
People accused of sexual abuse and crimes often spend time with mental-health professionals who spend hours speaking to them to learn about their psychological standing. The interviews and tests given are issued to try to gather as much information about the person as possible, even if it's not something the accused person wants to admit to. For instance, a test might show that the accused person is only attracted to adults, or it could show that he is attracted to only females.
There have always been tests that try to assess a person's likelihood of committing or being guilty of a crime. For instance, polygraphs, also known as lie-detector tests, may be used to catch someone in a lie. Penile plethysmographs can be attached to the penis to measure arousal. Are these tests always accurate? No, and they are hard to administer, making them fallible in court.
The Abel test is special because it essentially says that the longer you look at the images provided, the more sexual interest you have. This is an assumption that some disagree with, since looking at an interesting image for a longer period of time doesn't automatically mean you're sexually interested in the subject.
Source: The Atlantic, "The Sex-Offender Test," Maurice Chammah, accessed Aug. 20, 2015