Electrical outlet tester

An electrical outlet tester, receptacle tester, or socket tester is a small device containing a power plug and three indicator lights, used for quickly detecting some types of incorrectly-wired electrical wall outlets. The tester is easily carried in a pocket, can be used with little training, and can identify some common wiring problems, but can fail to indicate other types of wiring defects.
Tests and limitations.
The outlet tester checks that each contact in the outlet appears to be connected to the correct wire in the building's electrical wiring. It can identify several common wiring errors, including swapped phase and neutral, and failure to connect ground. 
The tester confirms continuity and polarity of the electrical connections, but it does not verify current-carrying ability, electrical safety (which requires impedance testing), insulation breakdown voltage, or loop connection of ring mains.
Simple three-light testers cannot detect some potentially serious house wiring errors, including neutral and ground interchanged at the receptacle; there may also be a "bootleg ground", where the neutral and ground pins have been connected together at the receptacle, which cannot be detected as well. These problems can be detected with a multimeter and a test load, to verify that the ground connection is separate from the neutral and is not carrying normal circuit return current, or more typically by using a more-sophisticated multifunction tester.
Some receptacle testers include an additional test button to test the triggering of GFCI devices, which supplements the built-in test button on the GFCI and can be used for testing outlets downstream from a GFCI receptacle. Other testers may include earth loop impedance and other checks.
History.
An early reference that describes the typical outlet tester circuit was published in Popular Mechanics in the March issue of 1967, and consists of two 27 kΩ resistors, one 100 kΩ resistor, and three NE-51 neon lamp bulbs with 100 kΩ resistors.