I didn't have to take any written tests this last time I was looking for a job but I did have to interview. I thought I had failed the interview miserably for the job I got. I went on interviews for two other jobs after this one and thought I did well and the one that I thought I had blown was the job I got. I started this job the week of my 49th birthday and it had been 19 years since I had last looked for a job, if someone in my circumstances can get a job anyone can. You will find the right job.
I agree with everyone else, Fran. It's too bad that you failed the test, but I firmly believe (and know from experience) that when fate closes a door it opens a window. There's something better out there waiting for you to find it!