How can I test that my stepper motors for functionality and compliance? I bought a set of 5 stepper motors from Trianglelab's official Aliexpress shop.

Only one of these motors was given any kind of protective bubble wrap for shipping. The contents of the package shifted in transit and several of the motors got banged up with two of them suffering visible damage to their wire insulation.
I contacted Trianglelabs and was told to fix it myself for \$0.03 with a wire or to add some tape. This repair advice was accompanied with the weightiest assumptions of my personal expertise that I have ever received.
At this point I'm not planning to keep them if this is how the company does business; shaving pennies on shipping and telling the buyer to fix it themselves.
But all of this brought up an interesting question. How can I reliably test my stepper motors for basic functionality and measured compliance with the rated specifications?
For the AliExpress part, open a dispute and attach pictures to the dispute and ask for a partial, reasonable discount. It always worked for me.
As for how to test the motors themselves, it depends on what other hardware you have.
For example, you could wire the motors to your printer board, and try to issue a G6 command to that motor.
If you find issues while testing the motors, that could be evidence for an even bigger discount, or even full refund if the motor doesn't work.