The invention relates to a testing device and method for deflagration to detonation transition. The device comprises a sample tube, a verification plate and a plug, wherein the sample tube is used for containing a sample to be tested, the verification plate is fixedly installed at one end of the sample tube and used for packaging the sample and detecting whether a perforation is formed in the verification plate or not during combustion of the sample, and the plug is fixedly installed at the other end of the sample tube. The method comprises the steps that the sample is ignited for testing when the sample is packaged in the sample tube, and meanwhile, detonation velocities of the sample between adjacent test holes are tested to obtain at least two groups of detonation velocities; if the perforation is formed in the verification plate, it proves that the sample has the deflagration to detonation transition, or if the detonation velocity of the sample is stable, it proves that the sample has the deflagration to detonation transition, wherein the stability of the detonation velocity of the sample refers to that the standard deviation of at least two groups of detonation velocity values is not more than 35. The device is particularly applicable to deflagration to detonation transition tests of high-energy propellants. Compared with traditional testing methods and devices for the deflagration to detonation transition, the testing device and method have the advantages that two evaluation indicators, namely, the perforation and the stable detonation velocity are adopted, so that the testing efficiency and the data credibility are improved.