I would definitely go with reward for the hard work before the test. The onus then is on the work and not the results. If we reward for results and our DC's fail to gain those results they can become all or nothing thinkers.
I think it's trickier than that. Whilst you definitely want to reward the effort (as it is a vital skill to acquire) you cannot not ignore teaching the value of results. Whether you are a plumber, a start-up founder, a musician, a city boy or some sort of manager, you will not get paid or recognised for effort, only for results.
Ideally then, the best would be to have 2 sorts of rewards. One for the effort (possibly just after the exam) and one for the success. This way you reward both aspects of the work done.
Surely if you reward the effort, they will be motivated to always make an effort. If they do this, then they will get the results they need, if they are working on something that is suitable for them. So, in the workplace, if they are in the right job then if they make the same effort that they have always been rewarded for, then they will get the result and the baubles that go with it. We as parents do not need to reward the result, we need to reward the effort so that they put their best into whatever they do. Its up to them to find a job that means their effort yields results, no amount of rewarding results will help that. And in fact, rewarding results may well mean we reward an area where they haven't made an effort which can then lead to a greater shock when they do take a job and not make effort - cue disappointment in results and no baubles.