Abstract:In the software testing, coverage of test cases is one of the important prerequisites to find software defects. In this study, the experiment method in software engineering was used to analyze the coverage of program modules and program branches. Based on the Defects4J dataset, Evosuite and Randoop tools were used to generate test cases under different generating time limits. When the generation time exceeded 20 s, the numbers of test cases produced by Randoop was more than that produced by Evosuite, but the coverage of Evosuite test cases was significantly higher than the coverage of Randoop. At the same time, this study also analyzed the factors affecting the coverage. It is a good reference for how to use these tools to generate high coverage test case and for the improvement of tools.