Home // ICSEA 2022, The Seventeenth International Conference on Software Engineering Advances // View article
A Case Study on Combining Model-based Testing and Constraint Programming for Path Coverage
Authors:
María Carmen de Castro-Cabrera
Antonio García-Dominguez
Inmaculada Medina-Bulo
Keywords: Model-based Testing; Path Coverage; Constraint Programming; GraphWalker; MiniZinc
Abstract:
This paper within the advances in software testing is related to the generation of test suites and black box testing. Test coverage is a popular technique to evaluate test quality: a test suite that can exercise a large part of the paths in a program will provide higher confidence that the program will work as expected. One way to obtain test suites with high path coverage is through model-based testing, and specifically using a diagram, which represents the various states in the program and their possible transitions. Using model-based testing, it is possible to obtain a set of paths that achieves a set of coverage criteria. Constraint programming approaches can then be used to turn each path into a test case with its program inputs and oracle, by solving the input and output constraints collected along the path. In this paper, we present a case study on this combination of techniques, by developing a state diagram that represents a popular piece of software, and using it to derive a set of test cases that achieve path coverage through constraint programming. Specifically, two tools have been used: GraphWalker (to obtain a set of paths through the program) and MiniZinc (to obtain test inputs by solving the constraints along the paths). We have obtained good results on the cat GNU Coreutils utility, especially in terms of ease of understanding the logic of the software through the GraphWalker diagram and its visual execution, as well as the agility in obtaining the restrictions to be solved to achieve path coverage.
Pages: 41 to 45
Copyright: Copyright (c) IARIA, 2022
Publication date: October 16, 2022
Published in: conference
ISSN: 2308-4235
ISBN: 978-1-61208-997-3
Location: Lisbon, Portugal
Dates: from October 16, 2022 to October 20, 2022