论文标题
基于搜索的刮擦程序测试
Search-based Testing for Scratch Programs
论文作者
论文摘要
基于块的编程语言使年轻的学习者能够快速实施有趣的程序和游戏。在此撰写本文时,刮擦编程环境特别成功,有超过5000万注册用户。尽管Scratch简化了创建句法正确的程序,但学习者和教育工作者经常需要反馈和支持。动态程序分析可以实现此支持的自动化,但是动态分析所需的测试套件通常不存在用于刮擦程序。但是,可以将测试生成作为搜索问题进行测试生成。在本文中,我们介绍了一种使用语法进化来自动生成用于划痕程序的测试套件的方法。语法演化的使用清楚地将搜索编码与特定于框架的实现细节分开,并允许我们使用高级测试加速技术。我们将方法作为晶须测试框架的扩展。对样本刮擦程序的评估证明了该方法的潜力。
Block-based programming languages enable young learners to quickly implement fun programs and games. The Scratch programming environment is particularly successful at this, with more than 50 million registered users at the time of this writing. Although Scratch simplifies creating syntactically correct programs, learners and educators nevertheless frequently require feedback and support. Dynamic program analysis could enable automation of this support, but the test suites necessary for dynamic analysis do not usually exist for Scratch programs. It is, however, possible to cast test generation for Scratch as a search problem. In this paper, we introduce an approach for automatically generating test suites for Scratch programs using grammatical evolution. The use of grammatical evolution clearly separates the search encoding from framework-specific implementation details, and allows us to use advanced test acceleration techniques. We implemented our approach as an extension of the Whisker test framework. Evaluation on sample Scratch programs demonstrates the potential of the approach.