arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.08835cs.SEcs.CY
收藏

面向 Scratch 的基于积木的测试框架

A Block-Based Testing Framework for Scratch

Patric Feldmeier, Gordon Fraser, Ute Heuer, Florian Obermüller, Siegfried Steckenbiller

AI总结:

针对 Scratch 缺乏自动化测试阻碍教师反馈的问题,提出基于积木的测试框架及配套界面,使师生能直接在 Scratch 中创建自动化测试,实验证明该框架准确率达 0.93 且获教师认可。

摘要:

像 Scratch 这样的基于积木的编程环境被广泛应用于编程入门课程中。它们通过消除语法错误来促进对关键编程概念的学习,但破坏预期程序行为的逻辑错误仍然可能发生。发现此类错误需要进行测试,即运行程序并检查其行为。在许多编程环境中,这一步骤可以通过提供作为代码的可执行测试来自动化;但在 Scratch 中,测试只能通过用户输入调用事件并观察渲染的舞台来手动完成。虽然这对学习者来说可能足够了,但缺乏自动化测试可能会阻碍希望对学生解决方案提供反馈的教师。为了解决这个问题,我们在 Scratch 中引入了一个新的积木类别,使得创建自动化测试成为可能。借助这些积木,学生和教师都可以使用熟悉的基于积木的编程逻辑,直接在 Scratch 环境中创建测试并接收反馈。为了促进测试的创建并实现对一组学生解决方案的批量处理,我们用一个配套的测试界面扩展了 Scratch 用户界面。我们与 28 名教师一起评估了这个测试框架,他们为一款流行的 Scratch 游戏创建了测试,随后使用这些测试来评估学生实现并提供反馈。与手动评估 21 个学生解决方案的功能相比,教师测试的整体准确率达到了 0.93,这表明教师能够创建并有效地使用测试。随后的调查证实,教师认为这种基于积木的测试方法是有用的。

英文摘要:

Block-based programming environments like Scratch are widely used in introductory programming courses. They facilitate learning pivotal programming concepts by eliminating syntactical errors, but logical errors that break the desired program behaviour are nevertheless possible. Finding such errors requires testing, i.e., running the program and checking its behaviour. In many programming environments, this step can be automated by providing executable tests as code; in Scratch, testing can only be done manually by invoking events through user input and observing the rendered stage. While this is arguably sufficient for learners, the lack of automated testing may be inhibitive for teachers wishing to provide feedback on their students' solutions. In order to address this issue, we introduce a new category of blocks in Scratch that enables the creation of automated tests. With these blocks, students and teachers alike can create tests and receive feedback directly within the Scratch environment using familiar block-based programming logic. To facilitate the creation and to enable batch processing sets of student solutions, we extend the Scratch user interface with an accompanying test interface. We evaluated this testing framework with 28 teachers who created tests for a popular Scratch game and subsequently used these tests to assess and provide feedback on student implementations. An overall accuracy of 0.93 of teachers' tests compared to manually evaluating the functionality of 21 student solutions demonstrates that teachers are able to create and effectively use tests. A subsequent survey confirms that teachers consider the block-based test approach useful.

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

↑