Within density functional theory, a coordinate-scaling relation for the coupling-constant dependence of the exchange-correlation kernel f xc (r,rЈ;) is utilized to express the correlation energy of a many-electron system in terms of f xc . As a test of several of the available approximations for the exchange-correlation kernel, or equivalently the local-field factor, we calculate the uniform-gas correlation energy. While the random phase approximation ( f xc ϭ 0͒ makes the correlation energy per electron too negative by about 0.5 eV, the adiabatic local-density approximation ͓ f xc ϭ f xc (q ϭ 0, ϭ 0͔͒ makes a comparable error in the opposite direction. The adiabatic nonlocal approximation ͓ f xc ϭ f xc (q, ϭ 0͔͒ reduces this error to about 0.1 eV, and inclusion of the full frequency dependence ͓ f xc ϭ f xc (q,)] in an approximate parametrization reduces it further to less than 0.02 eV. We also report the wave-vector analysis and the imaginary-frequency analysis of the correlation energy for each choice of kernel.