***Neither a teacher nor a native speaker.***
What exactly do you mean?
So the correct answer (according to the test is):
I can't believe I failed yesterday's test!
I would have said:
I can't believe I failed at yesterday's test!
And you say it should be:
I can't believe I failed the yesterday's test!
In my opinion you don't need the here because yesterday already tells us which test you mean.
If there were several tests yesterday, it could make sense to use the, in order to refer to a specific one.