November 22, 2019
Giovanni Denaro
Despite the recent improvements in automatic test case generation, test case generators do not yet handle well programs with complex structured inputs. Random generators struggle to instantiate structured inputs due to the vastness of the solution space. Search-based generators address the problem by steering random selection to coverage target, but fall short of generating inputs that cover program elements whose reachability depends on non trivial input structures. Symbolic executors effectively capture complex dependencies on structured inputs, but fail in generating legal sequences of method calls.
In this talk, I present a new approach to automatically generate test cases for programs with complex data structures as inputs. We use symbolic execution to generate path conditions that characterise the dependencies between the program paths and the input structures, and convert the path conditions to optimisation problems that we solve with a search-based approach to produce sequences of method calls that instantiate those inputs. Our current results show that the approach is indeed effective in generating test cases for programs with complex data structures as inputs, thus opening a promising research direction.