Hi, I actually asked my instructor this before my test lol
She says the test is immediately ended as it is illegal to drive on after a crash regardless of fault. If the crash is not your fault the examiner will know and sympathise with you and you will get a free test rebooking.
If the crash is your fault and there's damage that you're liable to pay for or even be charged with an offence then the examiner will make sure the situation is escalated and dealt with by the relevant authorities e.g. police and insurance companies
Hopefully this never happens to anyone so please don't stress!