Stepper motor wiring
Occasionally we may come across an old stepper motor salvaged from a printer or an ancient floppy drive. If we are lucky, there will be a part number on the motor and after some digging around, we will come up with a datasheet. Often though, we will have a motor with no markings whatsoever and four, or six colorful wires sticking out. First, we need to figure out how the wires are paired to form coils within the motor. (an example from http://www.powerjackmotion.com/product/2-phrase-110mm-stepper-motor/ )Trial and error may work, but there is a better way! All it takes is a multimeter.
How to identify 2 Phrase stepper motor coil pairs with a multimeter
Need to consider the following parameters:

Holding Torque Large motors require high torque.
Output Speed If the output speed is high, torque is lower and vice versa.
Pulses Per Second It refers to no-load starting frequency of stepping motor.
Phase 2 Phase motors are often used for normal applications. 3 Phase motors are used for high speed and high torque requirements.
Special Parameters, In addition, we may need to consider a few special parameters such as water proofing, output shaft length, and diameter among others.