The investigation of discrete roughness elements induced boundary layer transition on NACA0012 airfoil has been studied by direct numerical simulation (DNS) and oil-film interferometry technique, mainly focusing on the effect of roughness elements height and spacing on the boundary layer transition as well as the mechanism. The results show that, roughness elements on the airfoil surface can accelerate transition process by exciting three dimensional ∧ vortices and horseshoe vortices. Increasing roughness element height and reducing spacing will advance the boundary layer transition. The influence is more intense on the area behind the roughness elements compared with that on the region between adjacent roughness elements.