The Open Automation and Control Systems Journal
2014, 6 : 468-472Published online 2014 December 31. DOI: 10.2174/1874444301406010468
Publisher ID: TOAUTOCJ-6-468
Improvement of the Baseline Method in Structural Testing
ABSTRACT
An algorithm based on the generation for baseline path is proposed in this paper. Making use of it, the original baseline path can be generated randomly and automatically. In respect of traversing the basic path group, the algorithm introduces the method of depth-first search to avoid storing more information of branch node and decrease the time of linear traversal. Using the column with S-node with no in-degree and the row with E-node with no out-degree, the case of nodes’ value and the number of value cases are stored for reducing the waste in storage. Furthermore, giving priority to the behind path-node when generating a path, the time of judgment for loops is effectively reduced. Theoretical analysis and experimental results show that this new algorithm has an advantage over the original Baseline Method in efficiency and space complexity of the test path generation. The average space complexity is decreased from O(n) to O(log n) , and the time complexity is also reduced to a certain extent.