The O2 sensor works like a miniature generator and produces its own voltage when it gets hot. The greater the difference, the higher the voltage reading. An oxygen sensor will typically generate up to about 0.9 volts when the fuel mixture is rich and there is little unburned oxygen in the exhaust.
Before you can test the operation of the sensor, you will need an oscilloscope. You should first thoroughly warm up the engine - remember that the sensor will only function once it has reached its operating temperature.
Two methods of testing an oxygen sensor are using an oscilloscope or a multimeter. An oscilloscope is the best method for testing. That will give you the exact output of the sensor along with its response times. A multimeter can also be used but this will only give an indication if there is an output or no output. The sensor will be switching too quickly for any response times to be measured.
OSCILLOSCOPE - Using an appropriate connecting device, connect the sensor output to your oscilloscope; do not disconnect the sensor from the ECU. Run the engine at approximately 2000 rpm. A properly functioning oxygen sensor will show a rapidly fluctuating output voltage between approximately 0.1 and 1.0 volts. The time taken for the voltage to change from 0.1V to 1.0V (referred to as the lean to rich response time) should be about 300 milliseconds. A similar time should be measured when the voltage changes from 1.0V to 0.1V (rich to lean response time).
MULTIMETER - For testing with a digital multimeter you will also need to connect the sensor output to the multimeter using an appropriate connecting device. Run the engine at approx. 2000-2500 rpm. The output will be a DC voltage, oscillating between approximately 0.1V and 1.0V. Although the sensor output is technically an oscillating DC voltage, some multimeters may require to be set on AC voltage measurement to correctly read the sensor output. Also, the response time of the multimeter must be better than the response time of the sensor. If the multimeter is too slow, then a constant output will result, even though the sensor is actually switching.
If the sensor output is constant or the response time is too slow, the sensor should be changed. A slow sensor will affect fuel economy.
A new sensor will restore fuel efficiency..
@Xulfiqar @SER_GTR @VCheng please add more if there is something missing to such diagnostic of O2 sensor