| With the flying development of information technology, software products are proliferated in various social fields, and the quality of them has become the focus people pay great attention to. Software test is the main means to guarantee software quality, and unit test is the elementary test in the process of software test. According to the current research status of software unit test problems, we will investigate module dependencies in the source file and the automated test case generation.The standardization and the stratification of code and the rationalization of the dependency relations among modules are important factors of software quality. After analyzing module dependencies, test case must be designed for each module in the source file, to achieve some test coverage criteria, and to ensure test adequacy. Unit test can be divided into two processes namely checking the code and executing the test, which detailedly includes scanning the source file, checking the code, analyzing the speciality of module dependencies, generating test cases and finally executing the test. In order to improve the efficiency and the veracity of unit test, it is essential to automate above processes, so to reduce manual work.Then we research and implement a unit test system on the basis of problem analysis. For the code checking problem, we put the source file into lexical analysis and syntax parsing by using lex and yacc tools. For the module dependencies problem, we add some code into parsing program, to generate digraph describing the module dependencies relations, then use a measurement criterion named cumulative module dependency (CMD) to weigh the code quality, which is associated with the spending of incremental module test in the unit test closely and can analyze the code quality quantificationally. For the test case generation problem, we indicate the deficiency of a predicate slice based method, analyze the primary process namely establishing the linear constraint system, and finally propose an improved algorithm to estimate the consistency of linear constraint system, to transform the inconsistent system, so to find test data effectively. Finally, the system is proved to be correct and effective by analyzing the test results of several instances. |