That only tested your motor, right? It didn't check the cables or if there was noise, bad ground, short, bleeding, etc...
You may want to try removing the cable from your X or Y and hooking it up to the Z axis motor. Then just jog the the X or Y and see if you still have the problem. If the...