1. A lens module testing method, comprising: providing a lens module comprising a barrel and a lens received in the barrel; measuring whether a modulation transfer function value of the lens module is in a predetermined range; if not, separating the lens and the barrel, and forming a first coating layer and a second coating layer on the lens to obtain a coated lens, wherein a color of the first coating layer is different from a color of the second coating layer, the first coating layer completely covers the lens, the second coating layer includes a plurality of dots formed on the first coating layer, shapes of the dots are different from each other, and sizes of the dots are different from each other; capturing a first image of the coated lens using a camera module; placing the coated lens in the barrel to obtain the lens module, and capturing a second image of the coated lens placed in the barrel; randomly choosing one dot from the dots, and determining an actual moving distance of the chosen dot using a 3D-Digital image correlation method according to the first image and the second image; adjusting a size of the lens according to the actual moving distance of the random dot; and displaying the adjusted size of the lens to a user.