The Zero Degree Calorimeters (ZDC) for the ALICE experiment will measure the energy of the spectator nucleons in heavy ion collisions at the CERN LHC, providing a direct measure of the centrality of the collisions. ZDC are spaghetti calorimeters, which detect the Cherenkov light produced by the shower particles in silica optical fibers embedded in a dense absorber. The main characteristics of the ZP and ZN detectors are described in this article. The calorimeters were tested at the CERN SPS using pion and electron beams with momenta ranging from 50 to 200 GeV/c. Test beam results such as the calorimeter response, the energy resolution, the signal uniformity and the localizing capability are presented.