Automated Test Generation for Scratch Programs

02/13/2022
by   Adina Deiner, et al.
0

The importance of programming education has lead to dedicated educational programming environments, where users visually arrange block-based programming constructs that typically control graphical, interactive game-like programs. The Scratch programming environment is particularly popular, with more than 70 million registered users at the time of this writing. While the block-based nature of Scratch helps learners by preventing syntactical mistakes, there nevertheless remains a need to provide feedback and support in order to implement desired functionality. To support individual learning and classroom settings, this feedback and support should ideally be provided in an automated fashion, which requires tests to enable dynamic program analysis. The Whisker framework enables automated testing of Scratch programs, but creating these automated tests for Scratch programs is challenging. In this paper, we therefore investigate how to automatically generate Whisker tests. This raises important challenges: First, game-like programs are typically randomised, leading to flaky tests. Second, Scratch programs usually consist of animations and interactions with long delays, inhibiting the application of classical test generation approaches. Evaluation on common programming exercises, a random sample of 1000 Scratch user programs, and the 1000 most popular Scratch programs demonstrates that our approach enables Whisker to reliably accelerate test executions, and even though many Scratch programs are small and easy to cover, there are many unique challenges for which advanced search-based test generation using many-objective algorithms is needed in order to achieve high coverage.

READ FULL TEXT
research
09/09/2020

Search-based Testing for Scratch Programs

Block-based programming languages enable young learners to quickly imple...
research
02/13/2022

Model-based Testing of Scratch Programs

Learners are often introduced to programming via dedicated languages suc...
research
08/29/2022

Neuroevolution-Based Generation of Tests and Oracles for Games

Game-like programs have become increasingly popular in many software eng...
research
05/12/2021

Guiding Next-Step Hint Generation Using Automated Tests

Learning basic programming with Scratch can be hard for novices and tuto...
research
07/16/2023

Deduplicating and Ranking Solution Programs for Suggesting Reference Solutions

Referring to solution programs written by other users is helpful for lea...
research
04/05/2023

Code Critters: A Block-Based Testing Game

Learning to program has become common in schools, higher education and i...
research
11/07/2022

Automatic Creativity Measurement in Scratch Programs Across Modalities

Promoting creativity is considered an important goal of education, but c...

Please sign up or login with your details

Forgot password? Click here to reset