ISOCAM, the ISO camera is designed to map selected regions of the sky in the spectral regions 2.5 to 17 microns. It will make images, within the 3 arcmin field of view of ISO with two 32 X 32 infrared array detectors, one for the short wavelength range, below 5 microns, the second for the long wavelength range, above 4.5 microns. Filter wheels and lens wheels allow to change the spectral resolution and the pixel field of view. Circular variable filters are also mounted on the filter wheel. The instrument is ready for delivery to ESA, after a thorough testing and calibration phase. Test has been conducted in a facility that simulate the ISO environment. A particular care has been taken to ensure the appropriate level of IR background inside the calibration cryostat, to check the detectors in the actual IR flux range that they will experience in flight. This paper presents the results on this test and calibration campaign, with a particular emphasis on the optical performances and on the behavior of the detectors. Photometric performances have been obtained for all the observing modes of ISOCAM. Some of these results, like stabilization of the detectors, have strong impacts on the observing strategy with ISOCAM.