I think the biggest single reason for failure has been that the student just isn't ready to sit the test. You have to have a very open relationship with the instructor, and the CFI about your progress.
I knew a few at my school who were really worried about the test. The view that a failure was the end of the chance of getting a job, plus all the additional expense, proved too much, and they worried all day long after about hour 3 of the IR course.
The truth is, that you will know when you are ready. I know I was, and I had the trust in both the CFI and my instructor when they said I was ready. Sure, you are going to be nervous - everybody will be- and the walk to the CAA exam centre really isn't that pleasant. But I can assure you, the nerves go when you ask for clearance, as there's too much to do.
So,
- be honest with your ability
- don't put unnecessary pressure on yourself, for instance, you only have enough cash for one more IR flight before the test.
- don't give yourself time pressure - you will complete it when you are ready.
- practice on the sim in your spare time, but don't overdo it.
- go to a school with a good record of first-time passes
- take each day as it comes, there's no need to worry about the test day for long while yet.
- you will know when you are ready for the test.