arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.10414cs.PL
收藏

基于属性的测试同品种器械的自动化目标测试

Automated, Targeted Testing of Property-Based Testing Predicates

Tim Nelson, Elijah Rivera, Sam Soucie, Thomas Del Vecchio, John Wrenn, Shriram Krishnamurthi

摘要:

背景:这项工作是基于基于属性的测试(PBT)。PBT是一种越来越重要的软件测试形式。此外,它作为一个具体的网关进入抽象领域的形式化方法。具体来说,我们专注于学生学习PBT方法。问题:学生在PBT的表现如何?我们的目标是评估他们作为PBT的一部分编写的谓词的质量。先前的工作引入了将谓词的属性分解为独立子属性的合取的思想。针对每个子属性测试谓词可以对其性能进行“语义”理解。方法:子属性独立性的概念似乎是直观的,也是先前工作中的一个重要条件。首先,我们证明了这种条件过于严格,可能会隐藏有价值的信息:它既低估了错误,又难以捕捉误解。其次,我们介绍了两种形式的自动化,一种基于PBT工具,另一种基于SAT求解,以实现学生谓词的测试。第三,我们将这些自动化工具的输出与手动构建的测试进行比较。第四,我们还衡量这些工具的性能。最后,我们重新评估学生的表现报告在以前的工作。知识:我们显示的困难所造成的独立子属性的要求。我们提供了如何有效地使用自动化来评估PBT谓词的见解。特别是,我们讨论了我们必须采取的步骤,以击败人类的表现。我们还提供了如何使自动化有效工作的见解。最后,我们提出了一个更丰富的帐户比以前的工作是如何做的学生。接地:我们的方法是在数学逻辑接地。我们还利用了从更正式的规范生成测试的原则。这种结合确保了我们工作的健全性。我们使用标准方法来衡量绩效。重要性:作为教育工作者和程序员,我们相信PBT是学生学习的宝贵工具,随着越来越多的开发人员认识到它的价值,它的重要性只会越来越大。有效的教学需要清楚地了解学生的知识和进步。我们的方法可以对学生在PBT上的表现进行丰富和自动化的分析,从而深入了解他们的理解,并可以捕捉误解。因此,我们希望这些结果对教育工作者有价值。

英文摘要:

Context: This work is based on property-based testing (PBT). PBT is an increasingly important form of software testing. Furthermore, it serves as a concrete gateway into the abstract area of formal methods. Specifically, we focus on students learning PBT methods. Inquiry: How well do students do at PBT? Our goal is to assess the quality of the predicates they write as part of PBT. Prior work introduced the idea of decomposing the predicate's property into a conjunction of independent subproperties. Testing the predicate against each subproperty gives a "semantic" understanding of their performance. Approach: The notion of independence of subproperties both seems intuitive and was an important condition in prior work. First, we show that this condition is overly restrictive and might hide valuable information: it both undercounts errors and makes it hard to capture misconceptions. Second, we introduce two forms of automation, one based on PBT tools and the other on SAT-solving, to enable testing of student predicates. Third, we compare the output of these automated tools against manually-constructed tests. Fourth, we also measure the performance of those tools. Finally, we re-assess student performance reported in prior work. Knowledge: We show the difficulty caused by the independent subproperty requirement. We provide insight into how to use automation effectively to assess PBT predicates. In particular, we discuss the steps we had to take to beat human performance. We also provide insight into how to make the automation work efficiently. Finally, we present a much richer account than prior work of how students did. Grounding: Our methods are grounded in mathematical logic. We also make use of well-understood principles of test generation from more formal specifications. This combination ensures the soundness of our work. We use standard methods to measure performance. Importance: As both educators and programmers, we believe PBT is a valuable tool for students to learn, and its importance will only grow as more developers appreciate its value. Effective teaching requires a clear understanding of student knowledge and progress. Our methods enable a rich and automated analysis of student performance on PBT that yields insight into their understanding and can capture misconceptions. We therefore expect these results to be valuable to educators.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑