The first one is much more common, I think. I would use "on" instead of "in". You could also say "Tom didn't make any mistakes on his test." If someone says "on his test", I think that the test is written. If someone says "in his test", I think that the test may be written or that it could possibly by a speaking test or another type of test.