The invention provides an automatic test method, which comprises A, setting demanded test samples and searching the function lib of each test sample, B, searching the function lib information of each function lib of prior test sample, and calling and loading each function lib according to the function lib information, C, when each function lib is loaded successfully, calling and executing prior test sample, D, when there is demanded test sample after prior test sample, executing step B, or else, ending process. The invention further provides an automatic test system. The inventive method and system can automatically load the function lib of test sample to save test resource and improve test efficiency.