Gamification in Software Testing Education
Making software testing engaging for students through gamification.
― 7 min read
Table of Contents
Software Testing is a key part of software development. It helps ensure that programs work correctly and meet expectations. However, many students struggle with learning how to test their code effectively. They often find testing to be boring or difficult, which makes it hard for them to engage with important testing practices. To tackle this problem, we looked for a way to make testing more enjoyable and motivating for students.
One method we explored is Gamification. This means using game-like elements such as points, Challenges, and Leaderboards in non-game contexts to motivate people. In our case, we integrated gamification into a software testing course for students by combining it with a system called Continuous Integration.
The Importance of Software Testing
Testing is crucial in software engineering because it helps identify bugs or issues in a program before it goes live. When software is not tested properly, it can lead to serious problems, including software crashes and unhappy users. In the real world, companies can lose money and face reputational damage if their software fails.
Despite the known benefits, many new developers do not write enough tests. They often feel that testing takes too much time and lacks rewards. This is not just a problem for students; even experienced developers sometimes neglect testing. A lack of education about testing practices can contribute to this issue.
Gamification in Education
Gamification can help solve the motivation problem by adding fun and competitive elements to tasks. People often enjoy games because they provide clear goals, rewards for achievements, and a sense of competition. By using these principles in education, we can encourage students to engage with tasks they might otherwise avoid, like software testing.
In this course, we integrated gamification into the software testing curriculum using a tool that works with Jenkins, a popular continuous integration platform. This tool rewards students for completing testing-related challenges and encourages engagement with testing practices.
Continuous Integration
Continuous integration is a practice that automates the testing process. When developers write code, it is automatically tested through a system that runs the tests every time there is a change. This helps in catching issues sooner in the development process. The idea is to keep the code base healthy and ensure that new changes do not break existing functionality.
We used a specific plugin to add gamification features into Jenkins. This plugin generates challenges and rewards based on how well students test their code. The goal is to integrate testing and testing-related activities directly into the students' development work.
Our Approach
To understand how gamification can improve software testing education, we developed a program that allows students to earn points and rewards for testing activities. The gamification features we included are:
- Challenges: These are specific tasks that students must complete, such as writing additional tests for their code.
- Quests: These group several challenges together that students must complete in order.
- Leaderboards: This displays student scores and rankings based on their testing activities.
- Achievements: Students earn these by hitting specific milestones or completing certain tasks.
By using these features, we aimed to make testing feel less like a chore and more engaging.
Course Structure
The software testing course consists of two hours of lectures and two hours of practical exercises each week. Students must complete five coding projects during the course. Each project is designed to teach different testing concepts and practices.
The projects are:
- Initial Assignment: Students create and test a small class using a testing framework.
- Test-Driven Development: Students develop a web application in a test-first manner, writing tests before implementing features.
- Behavior-Driven Development: In this project, students create a graphical user interface and test it using web testing tools.
- Line-Coverage Analyzer: Students implement a tool to track which lines of code are tested.
- Coverage-Based Fuzzer: In the final project, students create a tool that generates input to test untested areas of the code.
For our research, we focused on the last two projects, where gamification was applied through the plugin.
Research Questions
To evaluate the effectiveness of our gamified approach, we aimed to answer three main questions:
- How did students use the gamification tools during the course?
- What changes in testing behavior did we observe among the students?
- How did students feel about the integration of gamification into their coursework?
Student Engagement
Throughout the course, we collected data on how students interacted with the gamification features. Overall, 26 students completed the projects. They tackled various challenges, quests, and achievements using the tool, and we analyzed how many they completed, how many they rejected, and their overall engagement.
We found that students completed a large number of challenges and quests. The majority of the challenges they completed were related to increasing code coverage or improving their mutation scores. However, they also rejected many challenges, often looking for easier alternatives.
Testing Behavior
In terms of testing behavior, we examined key metrics such as the number of tests written, the number of code commits, line coverage, and mutation scores. These metrics helped us evaluate the effectiveness of the gamification approach.
Students wrote an average of 14.8 tests for one project and 21.8 for another. Most students aimed for high line coverage, nearly achieving 100% for both projects. The results from the mutation tests showed they also worked hard to identify untested areas in their code. This suggests that integrating gamification positively influenced their testing strategies.
We also noted a significant increase in correct program outputs among students using the gamification tool, which points to its benefits for learning.
Student Perception
After completing the course, students provided feedback on their experience with the gamification tool. Many reported that they enjoyed using the tool and found it helpful for learning how to write tests. Challenges were particularly popular, while some students struggled with quests.
While students appreciated the competitive aspects and how the gamification features motivated them to test more, there were some concerns. Some felt they wrote unnecessary tests simply to complete challenges instead of focusing on meaningful testing.
Despite some challenges, the feedback overall indicated a high level of satisfaction with the integration of gamification into the course. Students felt that the structure made them more accountable for testing their code and discovering bugs.
Conclusions and Future Work
Our research showed that gamifying software testing education can lead to better engagement, improved testing practices, and enhanced learning outcomes. By integrating the gamification tool into continuous integration systems, we successfully motivated students to write tests and improve their code quality.
While the results were promising, there are still areas for improvement. Future iterations of the tool could further refine the challenges and quests to make them more manageable and relevant to the coursework. Additionally, incorporating the tool directly into students' development environments could streamline the process and enhance user experience.
We also aim to explore the tool's effectiveness in real-world industry settings, where testing practices might differ from those in educational contexts. By evaluating its impact in various environments and with different types of projects, we hope to learn more about how gamification can support software testing and quality assurance in the long run.
By focusing on continuous improvement, we can ensure that our teaching methods evolve alongside the rapidly changing landscape of software development, ultimately leading to better prepared graduates ready to face real-world challenges in their future careers.
Title: Gamifying a Software Testing Course with Continuous Integration
Abstract: Testing plays a crucial role in software development, and it is essential for software engineering students to receive proper testing education. However, motivating students to write tests and use automated testing during software development can be challenging. To address this issue and enhance student engagement in testing when they write code, we propose to incentivize students to test more by gamifying continuous integration. For this we use Gamekins, a tool that is seamlessly integrated into the Jenkins continuous integration platform and uses game elements based on commits to the source code repository: Developers can earn points by completing test challenges and quests generated by Gamekins, compete with other developers or teams on a leaderboard, and receive achievements for their test-related accomplishments. In this paper, we present our integration of Gamekins into an undergraduate-level course on software testing. We observe a correlation between how students test their code and their use of Gamekins, as well as a significant improvement in the accuracy of their results compared to a previous iteration of the course without gamification. As a further indicator of how this approach improves testing behavior, the students reported enjoyment in writing tests with Gamekins.
Authors: Philipp Straubinger, Gordon Fraser
Last Update: 2024-01-31 00:00:00
Language: English
Source URL: https://arxiv.org/abs/2401.17740
Source PDF: https://arxiv.org/pdf/2401.17740
Licence: https://creativecommons.org/licenses/by-sa/4.0/
Changes: This summary was created with assistance from AI and may have inaccuracies. For accurate information, please refer to the original source documents linked here.
Thank you to arxiv for use of its open access interoperability.