Abstract
This paper conducts an empirical study of a Control Flow Graphs (CFG) visualizer from which various test coverages can be exercised directly. First, we demonstrate how control structures are extracted from bytecode and compound conditions are decomposed into simple multi-level conditions in Java bytecode. Then, we visualize the decomposed compound conditions in CFG. The layout of a CFG is calculated by extending a force-directed drawing algorithm. Each control node of CFG represents a simple condition. The empirical study shows that (1) the tool successfully decomposes a compound condition into simple multi-level conditions and (2) the extended force-based layout algorithm produces the best layout for visualizing CFG.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
ABET Accreditation. [Online]. Available: http://www.abet.org/. Accessed 24 Sept 2019.
Graphviz - Graph Visualization Software. [Online]. Available: http://www.graphviz.org/. Accessed 2 Feb 2016.
Eclipse Foundation. [Online]. Available: http://www.eclipse.org/. Accessed 30 Nov 2015.
Xu, W., Syed, A. R., Zheng, Q. (2015). A force-directed program graph visualizer for teaching white-box testing techniques. In ASEE annual conference and exposition. Seattle.
Eades, P. (1984). A heuristic for graph drawing. Congressus Numerantium, 160(42), 149.
Jorgensen, P. C. (2008). Software testing: A craftsman's approach (3rd ed.). Boca Raton: Auerbach Publications.
Lindholm, T., Yellin, F., Bracha, G., & Buckley, A. (2013). The java® virtual machine specification. Boston: Addison-Wesley Professional.
How would you test a vending machine?. (2011). [Online]. Available: http://www.softwaretestingquestions.net/category/testing-in-the-wild/. Accessed 24 Jan 2013.
Zhao, J. (1999). Analyzing control flow in ava bytecode. In 16th conference of Japan Society for software science and technology. Linz.
Sinha, S., & Harrold, M. J. (2000). Analysis and testing of programs with exception handling constructs. IEEE Transactions on Software Engineering, 26(9), 849–871.
Amighi, A., PC, de Gomes., Gurov, D., Huisman, M. (2012). Sound control-flow graph extraction for Java programs with exceptions. In 10th international conference on software engineering and formal methods. Berlin/Heidelberg.
Di Battista, G., Eades, P., Tamassia, R., Tollis, I. G. (1998). Graph drawing: Algorithms for the visualization of graphs. Upper Saddle River: Prentice Hall PTR.
Würthinger, T. (2006). Visualization of java control flow graphs. Linz, Austria: Johannes Kepler University.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Xu, W., El Ariss, O., Liu, Y. (2018). An Empirical Study of Control Flow Graphs for Unit Testing. In: Latifi, S. (eds) Information Technology - New Generations. Advances in Intelligent Systems and Computing, vol 558. Springer, Cham. https://doi.org/10.1007/978-3-319-54978-1_69
Download citation
DOI: https://doi.org/10.1007/978-3-319-54978-1_69
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-54977-4
Online ISBN: 978-3-319-54978-1
eBook Packages: EngineeringEngineering (R0)