If students are allowed to use Mathematica during a test then asking them to find f' using the definition of f is not helpful in determining if they understand the concepts. They, for all reasonable problems, just need to execute a single command:
Limit[ (f[x+h]-f[x])/h, h->0]
This doesn't really test their understanding. If one is going to allow students to use Mathematica on a test then the problems need to be adjusted.