Error-"Unable to write to the last block of the device."
Testing cabling is more of an empirical exercise. First you disconnect and reseat both ends of the cable. Next, you put in the new cable and if the problem goes away it was the cable. If you suspect the cable on an intermittent problem you replace the cable and leave it in after reseating doesn't reduce the frequency of the issue.

I'd start with reseating things and re-testing. Since you have a good test you'll know pretty quickly if it's the drive, the cable or the driver board / software that's causing the write failure.

Also, check that the drive has updated firmware / appropriate firmware for your version of OS.