Ancient China's civil service selection system evolved through the stages of the Recommendation system, the Nine-grades Just System, and the Testing System. The Testing System was the longest of these stages, and the system has had a far-reaching influence on China's education and government. Understanding the civil service test system is thus an important foundation for understanding the social and political development of China. This paper attempts to understand the early development of the civil service test system from its establishment in the time of the Sui dynasty. This paper shows that China's ancient testing system had its inception during the Han dynasty, took shape during the Sui dynasty, and achieved a mature state during the Tang dynasty. The Sui dynasty was an important turning point in that tests began to take precedence over recommendations in the selection of talented official candidates. At the same time, authority over the selection of candidates shifted from local officials to the central government, which was a key means of centralizing political power. Nevertheless, as far as influence on later dynasties was concerned, the establishment of a testing system in the Tang had the most far-reaching impact. For example, the recommendation of candidates by the Ministry of Rites became a tradition over subsequent centuries. The high-ranking "chinshih" category was the goal of all ambitious scholars from the Tang dynasty all the way to the Qing dynasty. Many of the tsts and associated practices that flourished in recent dynasties originated in the Tang.