Yes, if under warranty.
Most of the time they will just replace the drive no questions asked. So it would not be completely necessary to test it to make sure it is bad. So if you don't need it right away and don't want to do diagnostics then you could just set up the RMA and send it back.

If you are curious or just want to know you could download a diagnostic testing program from the manufacturer's website and run it on the drive (if it will run).
Just be aware that when dealing with a failing hard drive there is going to be just one last time it will run before it blinks out for good. You may have reached that point already. But if you needed to get data off the drive you would not want to waste that last opportunity testing it.