it's probably a case of 'stage fright'.
if you're shy about playing in front of an examiner, begin first by playing for your family and friends. stage a mock performance where you perform your test pieces for them! sometimes, those nearest to you may be your harshest critics. so ask them for advice, if they can give it to you.
the other thing would be to know the syllabus well. as with school exams, it sucks to go into the examination hall being poorly prepared. so the only way to get rid of 'i can't play' jitters would be to practise practise practise!
begin your practice session by playing flawless scales and aim for perfection in your test pieces a couple of weeks before your exam. this will boost your confidence because you know you can do it!
i hope this helps, this was how i used to practise for my abrsm exams.