You can not be tested without your informed consent. This means that the reason for testing must be explained to you, and you must know who will have access to your test results. You must also understand what the testing will involve, and what the consequences of agreeing to be tested or refusing to be tested will be. Informed consent should be obtained in writing.
Sometimes, when people are applying for a job, it is assumed they by applying you must have consented to being assessed. This attiitude is not encouraged among professional test users. If there is anything unusual about the testing process, for instance if you are being tested using a computer, you must give informed consent.
Before you can give informed consent, it is also important that you must have the capacity to consent. In the case of children, a parent or guardian may have to consent. This may also be the case with a person who is very ill or injured and can not consent for themselves.
However, it is important to know that nobody can be tested against their will. Thus even if the parents have consented to have a child tested, the child must still assent (agree) to be tested.