You connect a load to the motor shaft that you can control and then you apply so much load that it quits rotating. Possibly look at using an eddy current clutch with the output tied to the mounting frame. You can also use a DC motor and drive, an AC motor with an oversized VFD and braking resistor or regen VFD, or a larger AC motor by applying DC to the stator (I'd suggest about 4X the size of the driven motor).
I give 3-phase motors more credit than 1 or 2 seconds before letting the smoke out. I've seen some smaller motors (10-50hp) with a rated locked-rotor time of 40 seconds. This means you can apply full line voltage and frequency for 40 seconds with the rotor locked (not rotating) without damaging the motor. Is this good for the motor? No, not really but if you don't go over the rated locked-rotor stall time you shouldn't cause any damage. Allow the proper cooling off time between tests of course.
1-phase motors are often not as rugged. The start winding that is switched out as the motor accelerates often isn't capable of much more than a few seconds of operation and would quickly be damaged in a locked-rotor condition.