University of Alabama Libraries
Integrating a Test-Driven Development Process into Scratch to Support Unit Testing and Autograding
Abstract
dc:description.abstractBlocks-based Programming Languages (BBPLs) provide a visual introduction to programming for students. These languages provide a drag-and-drop interface, simplify programming concepts, and often encourage collaborative creativity. Scratch is a widely adopted BBPL that uses a blocks-based user interface design to encourage computational thinking and problem-solving skills.Scratch assists students in creating interactive projects, but it lacks robust tools to support programming practices, such as Test-driven Development (TDD), a software development methodology where tests are written first, reducing errors and encouraging iterative problem-solving. Integrating TDD into Scratch may offer an opportunity to enhance the learning of both programming fundamentals and software development practices.This dissertation explores integrating TDD concepts into Scratch by enabling unit testing and grading support within the Scratch environment. This work introduces a Scratch testing block extension that includes an assert block. This dissertation motivates the need to support Scratch testing through examples demonstrating how a testing extension can be used. The Scratch extensions developed to support these ideas can help students identify errors within their programs and facilitate a valuable learning process through a test-driven approach.There is a challenge in integrating testing concepts into BBPLs like Scratch. The output of a BBPL is often visual, compared to the traditional unit testing that often compares text or numeric output. In this dissertation, we use a graphical comparison method and a supporting tool designed to evaluate the visual output of Scratch programs. Our approach compares two-dimensional (2D) images representing a Scratch project's expected and actual output after execution. To enable this comparison, we create a graphical grading feature for Scratch, using the Structural Similarity Index (SSIM) to measure the visual similarity between the two outputs. To support our approach, we conducted experiments using Scratch projects sourced from CreativeProgramming.org, a platform that hosts an international Scratch Olympiad for students of various ages. We share the results of this approach, highlighting how our method offers a promising step for introducing testing into Scratch projects with the potential to support teachers in grading assignments.
Degree
thesis:*- Grantor dc:publisher
- University of Alabama Libraries
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Nurue, Herart Dominggus
- Advisor dc:contributor.advisor
-
- Gray, Jeff
- Contributors dc:contributor
-
- Hong, Xiaoyan
- Crawford, Chris
- He, Hongsheng
- Luo, Feiya
Subjects
dc:subject × 5Rights
dc:rights- Statement dc:rights
-
- All rights reserved by the author unless otherwise indicated.
- Language dc:language.iso
- en_US, English
Identifiers
dc:identifier.*- Dc Identifier Other
- 1177182