What is the difference between dB and dBm when you are trying to test fiber optic cable? 

Decibel or dB is a unit to measure the amount of signal strength or loss in a sound system or an amplifier. When we induce power at one end of a fiber optic cable, the signal strength is measured. When the signal reaches the end of the cable and transmitted to the given device or system, the signal strength is measured again. Both these values are measured in decibels and they give us a ratio or comparison of the increase or decrease in the two values.
Decibel milliWatt or dBm is a unit that measures the amount of the total signal strength or power produced at a given site. So, we get an absolute value in terms of 1 milliWatt. There is no comparison in this case.
In terms of fiber optic networks, optical power and its loss is measured as it is in the form of light at the fiber. This is relative measurement of optical power loss in decibels, and it gets displayed on the power meter. The absolute power in dBm may be measured from either the transmitter or the receiver source. This is calibrated to a national standard such as NIST. The heat output in this case is much lower than an electric bulb and the light is in infrared wavelength, and thus invisible to human eye.