The SPectral IMager (SPIM) facility is a laboratory visible infrared spectrometer developed to support space borne observations of rocky bodies of the solar system. Currently, this laboratory setup is used to support the DAWN mission, which is in its journey towards the asteroid 1-Ceres, and to support the 2018 Exo-Mars mission in the spectral investigation of the Martian subsurface. The main part of this setup is an imaging spectrometer that is a spare of the DAWN visible infrared spectrometer. The spectrometer has been assembled and calibrated at Selex ES and then installed in the facility developed at the INAF-IAPS laboratory in Rome. The goal of SPIM is to collect data to build spectral libraries for the interpretation of the space borne and in situ hyperspectral measurements of planetary materials. Given its very high spatial resolution combined with the imaging capability, this instrument can also help in the detailed study of minerals and rocks. In this paper, the instrument setup is first described, and then a series of test measurements, aimed to the characterization of the main subsystems, are reported. In particular, laboratory tests have been performed concerning (i) the radiation sources, (ii) the reference targets, and (iii) linearity of detector response; the instrumental imaging artifacts have also been investigated.