Id argue that there is a small element of luck with a driving test, having terrible weather or angry/impatient drivers isn't gonna help your chances but in saying that, you should be able to competently handle anything that you might encounter on the roads
If it happens on your test, then it can happen after you've passed as well
Major faults are only given if your driving caused a potential danger to other road users. You are allowed 15 minor faults. If you get 16 minor faults, it isn't because you had a tricky course, it's because your driving is constantly sub-par. The test is only 40 minutes long. That's one fault every 2.5 minutes. That isn't bad luck, it's bad driving. If you got a major, you are not just a bad driver, you are a dangerous one. Failing a test is not bad luck, you are simply not ready to be on the road by yourself.