We do not use the expression "were good," in this way. We would say "if you did well," (if the test had already been taken) or "if you do well," (if the test has yet to be taken).
In both of these sentences (above) we would use "will," rather than would:
"If you did well, I will give you something."
"If you do well, I will give you something."