Electroretinography (ERG) is an eye test used to detect abnormal function of the retina (the light-detecting portion of the eye). Specifically, in this test, the light-sensitive cells of the eye, the rods and cones, and their connecting ganglion cells in the retina are examined.