In situ electrical resistivity measurement of powdered CdTe has been performed under high pressure using a diamond anvil cell equipped with a microcircuit. With the pressure increasing from 2.7 to 3.8GPa, a sharp decrease in resistivity of over three orders of magnitude is observed. This is due to the appearance of rock-salt CdTe. At about 6.5GPa a resistivity inflexion appears which has not been reported before. It is caused by the obvious decrease of band gap in certain symmetry directions of the Brillouin zone of rock-salt CdTe. From 6.5 to 10GPa, the descending trend of the resistivity turns gently. At about 10GPa, a cusp corresponding to the transition to the Cmcm phase is distinguished. Between 10 and 38GPa, three leap points have been detected at 15.5GPa, 22.2GPa and 30GPa, which imply abundant electronic phase transitions of CdTe. Resistivity measurements were also performed in a wide temperature range from liquid nitrogen temperature (77K) to 450K. It is proved that rock-salt CdTe does not show a typical metallic transport character. In the pressure range of 6.0-7.0GPa, CdTe has a band gap of about 445meV. The relationship of lnρ to 1/T is also fitted linearly to yield the ionization energy of impurities at different pressures.