This paper proposes a method to generate DC-paths (definition-clear paths) automatically. Firstly, this method makes static analysis on the structured program to get the defining and using information of the variables and the structure of the program. Secondly, it draws the program graph. Thirdly, it generates the DC-paths set of each variable. The method provides the testing possibilities between the extremes of the typically unattainable All-Paths criterion and All-DU-paths criterion. Based on this method, we implemented an automatic generator of DC-paths for data flow testing.
展开▼