{'fraction_non_alphanumeric': 0.024691358024691357, 'fraction_numerical': 0.0, 'mean_word_length': 4.942408376963351, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Singularity: A methodology for automatic unit test data generation for C++ applications based on Model Checking counterexamples

One of the most challenging task of testing activity is the generation of test cases/data. While there is significant amount of studies in this regard, there is still need to move towards approaches that can generate test case/data based only on source code since many software systems mostly have the source code available and no adequate documentation. In this paper a new methodology, called Singularity, is introduced to generate unit test data for C++ applications based on Model Checking, a popular technique for test case generation. Our approach, which is to be supported by a tool, automatically translates C++ code into a model which resembles a Statechart model and then into the notation of the NuSMV Model Checker. Later, we rely on a technique based on the HiMoST Method, producing counterexamples from the Model Checker that are, in fact, the test cases/data themselves. We have applied our approach to a few C++ case studies analyzing how feasible it is for automatic test data generation.