To test this sensor, you will need the use of an oscilloscope.
Visually check the connector, making sure it is attached properly and that all of the terminals are straight, tight and free of corrosion. Also inspect the notches in the crankshaft (4-cylinder) or flywheel (6-cylinder) for damage, and replace if necessary.
The output voltage of a properly operating crankshaft position sensor switches from high (5.0 volts) to low (0.3 volts). By connecting an oscilloscope to the sensor output circuit, you can view the square wave pattern produced by the voltage swing.