Abstract:Coverage testing is often used in white box testing. The lightweight coverage testing tool GCOV has the disadvantage of operating complicatedly. The design described in this paper is based on the principle of GCOV coverage testing. According to the characteristics of batch processing of shell script, all parts of the operation are encapsulated as script tools. Through the Expect script tool asserting whether the last operation is successful or not, to achieve all script tools being excuted automatically. The output of coverage report by this design saves a lot of time than traditional operation. At the same time, this design has advantages of operating simplely and transplanting easily. It greatly reduces the repeated operation of programmers and improves the efficiency of software development and testing.