In this paper, We analyze the contents including the factor that influence the linearity, the technology of the linearity testing device; we establish the math model of linearity testing that use the means of semi-conductor laser, PSD, and auto-centering device. We design the construction content of mechanical, light and circuit in linearity testing model and process the collecting data and write the software to computer the linearity through calculating the error and accuracy of this system. The study shows that the linearity testing can reach certain requirement.