Electronics repair technicians often use a digital multimeter to test whether a transistor is working properly or not. Simple tests with a digital multimeter tell you if if the transistor’s internal components, two back-to-back diodes, are passing sufficient voltage. If the voltage is too high or too low, the transistor is faulty. If you're not experienced working with transistors or a voltage meter, use a new transistor the first time you do a test so you will know you're performing the procedure correctly.
Get a working NPN transistor. You can order one online or buy one from a local electronics or hobby store. Select a common type of silicon NPN transistor, such as a small signal NPN transistor like the 2N3904. Read the transistor’s data sheet to determine the location of the transistor’s base, emitter and collector leads.
Set your digital multimeter to "Diode Test." Look for the diode symbol on your multimeter and move the function select switch to point to that symbol. Consult the multimeter's user manual if you can’t locate the diode test function.
Connect the multimeter’s positive probe to the transistor’s base lead. Connect the negative probe to the transistor’s emitter lead.
Read the measurement on the meter’s display. Compare the voltage reading to see if it's between the minimum and maximum values of the base to emitter saturation voltage given in the manufacturer's data sheet. For the 2N3904, the voltage should be between 0.5 volts and 0.95 volts.
TL;DR (Too Long; Didn't Read)
NPN transistors can be modeled as two back-to-back diodes. There is a diode between the transistor's base and emitter leads and a diode between the transistor's base and collector leads. Each of these diodes’ anodes is connected directly to the base of the transistor.
The voltage measured in the diode test is the forward on voltage, also called the turn-on voltage or the base-to-emitter voltage. Most silicon diodes have forward voltage drops in the order of 0.5 and 0.7 volts. Germanium diodes have forward voltage drops between 0.2 and 0.3 volts. The 2N3904 transistor is a silicon transistor, so you can expect a forward voltage drop in the range of 0.5 to 0.7 volts.
If the transistor you are testing is in a circuit, you will need to remove the transistor from the circuit board. Use a solder gun to melt the solder and a solder sucker to remove the heated solder. Melt the three solder joints that connect the transistor to the board, then remove the melted solder with the solder sucker. Pull the transistor out gently with some pliers.