EDBT 2026 Demo / reviewers in the wild / expert
Gordon Fraser 0001
dblp:74/2259
· DBLP profile ↗
180ranked-venue papers
38as first author
61since 2021 · last 2026
0000-0002-4364-6595ORCID · conflict
Domains — the database's venue-derived domains; a paper can count in several
Software engineering, systems software and programming languages · 150 · 33 first-author · 42 since 2021Artificial intelligence and machine learning · 31 · 5 first-author · 10 since 2021Human-computer interaction and ubiquitous computing · 18 · 2 first-author · 13 since 2021Graphics, computer vision, multimedia, augmented reality and games · 2 · 1 first-authorApplied, interdisciplinary, general and emerging computing · 2 · 2 since 2021
| Year | Publication | Venue | Position |
|---|---|---|---|
| 2026 | Understanding Bug-Reproducing Tests: A First Empirical StudyabstractDevelopers create bug-reproducing tests that support debugging by failing as long as the bug is present, and passing once the bug has been fixed. These tests are usually integrated into existing test suites and executed regularly alongside all other tests to ensure that future regressions are caught. Despite this co-existence with other types of tests, the properties of bug-reproducing tests are scarcely researched, and it remains unclear whether they differ fundamentally. In this short paper, we provide an initial empirical study to understand bug-reproducing tests better. We analyze 642 bug-reproducing tests of 15 real-world Python systems. Overall, we find that bug-reproducing tests are not (statistically significantly) different from other tests regarding LOC, number of assertions, and complexity. However, bug-reproducing tests contain slightly more try/except blocks and “weak assertions” (e.g., assertNotEqual). Lastly, we detect that the majority (95%) of the bug-reproducing tests reproduce a single bug, while 5% reproduce multiple bugs. We conclude by discussing implications and future research directions. Andre Hora 0001, Gordon Fraser 0001 |
AST | 2 |
| 2026 | Real-World Fault Detection for C-Extended Python Projects with Automated Unit Test Generation
Lucas Berg, Lukas Krodinger, Stephan Lukasczyk, Annibale Panichella, Gordon Fraser 0001, Wim Vanhoof, Xavier Devroey |
ICST | 5 |
| 2026 | Predictive Pull Request Batching to Accelerate Merge Pipelines in Continuous Integration at Scale
Maximilian Jungwirth, Martin Gruber, Gordon Fraser 0001 |
ICST | 3 |
| 2026 | Voice-Controlled Scratch for Children with (Motor) DisabilitiesabstractBlock-based programming environments like Scratch have become widely adopted in Computer Science Education, but the mouse-based drag-and-drop interface can challenge users with disabilities. While prior work has provided solutions supporting children with visual impairment, these solutions tend to focus on making content perceivable and do not address the physical interaction barriers faced by users with motor disabilities. To bridge this gap, we introduce MeowCrophone, an approach that uses voice control to allow editing code in Scratch. MeowCrophone supports clicking elements, placing blocks, and navigating the workspace via a multi-modal voice user interface that uses numerical overlays and label reading to bypass physical input entirely. As imperfect speech recognition is common in classrooms and for children with dysarthria, MeowCrophone employs a multi-stage matching pipeline using regular expressions, phonetic matching, and a custom grammar. Evaluation shows that while free speech recognition systems achieved a baseline success rate of only 46.4%, MeowCrophone's pipeline improved results to 84.9% overall, with simple commands reaching 96.9% accuracy. This demonstrates that robust voice control can make Scratch accessible to users for whom visual aids are insufficient. Elias Goller, Gordon Fraser 0001, Isabella Graßl |
ITiCSE (1) | 2 |
| 2026 | Challenges of deploying code embeddings: an industrial case study on method name generationabstractAbstract The recent hype around machine learning has fully captured software engineering research. Correspondingly, a variety of different ways to represent code as input to deep learning models have been proposed. These code embedding models are usually evaluated in terms of common metrics such as accuracy or bleu scores, on benchmark tasks such as predicting method names from their body. Although this evaluation approach is well established in research, it leaves open challenges for the deployment of these models in practice: First, comparing accuracy on standardised benchmark results conveniently avoids some of the challenges of actually running different prototype model implementations, which, however is necessary to apply the models in practice. Second, the models are usually trained and evaluated on abundantly available open-source training data, which may be very different from closed-source industrial code. Third, the deployment of machine learning models in an industrial environment does not only entail technical but also organisational challenges. Finally, while competitive accuracy or bleu scores may be indicative of relative model performance, they may not reflect to what extent the models are suitable for being used by developers. In this paper we describe our experience of evaluating and deploying state-of-research code embedding models in an industrial environment, and present lessons learned from our struggles with each of these questions. Benedikt Fein, Maximilian Jungwirth, Gordon Fraser 0001, Florian Kandlinger |
Autom. Softw. Eng. | 3 |
| 2026 | CDBench: Benchmarking the mutation testing capabilities of LLMs with code defendersabstractAbstract Most traditional benchmarks for evaluating Large Language Models (LLMs) in software development suffer from a narrow focus, high risks of data contamination, and static difficulty levels that fail to keep pace with rapid model evolution. To address these limitations, we introduce CDBench, a novel zero-sum benchmark based on the Code Defenders mutation testing game. By pitting models against each other in a competitive environment—where “attackers” introduce code mutations and “defenders” create tests to detect them—CDBench establishes a dynamic difficulty curve that scales naturally without human intervention. Our experiments reveal that while LLMs can generate diverse mutations, they often struggle with code validity; nevertheless, the framework effectively distinguishes model capabilities, highlighting the superior test generation of models like Gemini 2.5 Pro while exposing the instruction-following limitations of reasoning models. These findings demonstrate that zero-sum games offer a viable, contamination-resistant solution to the stagnation of current evaluation methodologies. Artur Romazanov, Gordon Fraser 0001, Steffen Herbold |
Empir. Softw. Eng. | 2 |
| 2026 | Learning by Viewing: Generating Test Inputs for Games by Integrating Human Gameplay Traces in NeuroevolutionabstractAlthough automated test generation is common in many programming domains, games still challenge test generators due to their heavy randomisation and hard-to-reach program states. Neuroevolution combined with search-based software testing principles has been shown to be a promising approach for testing games, but the co-evolutionary search for optimal network topologies and weights involves unreasonably long search durations. Humans, on the other hand, tend to be quick in picking up basic gameplay. In this article, we therefore aim to improve the evolutionary search for game input generators by integrating knowledge about human gameplay behaviour. To this end, we propose a novel way of systematically recording human gameplay traces, and integrating these traces into the evolutionary search for networks using traditional gradient descent as a mutation operator. Experiments conducted on 10 diverse Scratch games demonstrate that the proposed approach reduces the average search time from 5 hours down to only 97 minutes and helps the test generator achieve higher program coverage by reaching the winning states of games more often. Patric Feldmeier, Gordon Fraser 0001 |
ACM Trans. Evol. Learn. Optim. | 2 |
| 2025 | Exceptional Behaviors: How Frequently Are They Tested?abstractExceptions allow developers to handle error cases expected to occur infrequently. Ideally, good test suites should test both normal and exceptional behaviors to catch more bugs and avoid regressions. While current research analyzes exceptions that propagate to tests, it does not explore other exceptions that do not reach the tests. In this paper, we provide an empirical study to explore how frequently exceptional behaviors are tested in real-world systems. We consider both exceptions that propagate to tests and the ones that do not reach the tests. For this purpose, we run an instrumented version of test suites, monitor their execution, and collect information about the exceptions raised at runtime. We analyze the test suites of 25 Python systems, covering 5,372 executed methods, 17.9M calls, and 1.4M raised exceptions. We find that 21.4% of the executed methods do raise exceptions at runtime. In methods that raise exceptions, on the median, 1 in 10 calls exercise exceptional behaviors. Close to 80% of the methods that raise exceptions do so infrequently, but about 20% raise exceptions more frequently. Finally, we provide implications for researchers and practitioners. We suggest developing novel tools to support exercising exceptional behaviors and refactoring expensive try/except blocks. We also call attention to the fact that exception-raising behaviors are not necessarily "abnormal" or rare. Andre Hora 0001, Gordon Fraser 0001 |
AST | 2 |
| 2025 | What Types of Automated Tests do Developers Write?abstractSoftware testing is a widely adopted quality assurance technique that assesses whether a software system meets a given specification. The overall goal of software testing is to develop effective tests that capture desired program behaviors and reveal defects. Automated software testing is an essential part of modern software development processes, in particular those that focus on continuous integration and deployment. Existing test classifications (e.g., unit vs. integration vs. system tests) and testing best practices offer general conceptual frameworks, but instantiating these conceptual models requires a definition of what is considered a unit, or even a test. These conceptual models are rarely explicated in the literature or documentation which makes interpretation and generalization of results (e.g., comparisons between unit and integration testing efficacy) difficult. Additionally, comparatively little is known about how developers operationalize software testing in modern industrial contexts, how they write and automate software tests, and how well those tests fit into existing classifications. Since software engineering processes have substantially evolved, it is time to revisit and refine test classifications to support future research on software testing efficacy and best practices. This is especially important with the advent of AI-generated test code, where those classifications may be used to automatically classify the types of generated tests or to formulate the desired test output.This paper presents a novel test classification framework, developed using insights and data on what types of tests developers write in practice. The data was collected in an industrial setting at Google and involves tens of thousands of developers and tens of millions of tests. The developed classification framework is precise enough that it can be encoded in an automated analysis. We describe our proof-of-concept implementation and report on the development approach and costs. We also report on the results of applying the automated classification to all tests in Google’s repository and on what types of automated tests developers write. Marko Ivankovic, Luka Rimanic, Ivan Budiselic, Goran Petrovic, Gordon Fraser 0001, René Just |
AST | 5 |
| 2025 | AsserT5: Test Assertion Generation Using a Fine-Tuned Code Language ModelabstractWriting good software tests can be challenging, therefore approaches that support developers are desirable. While generating complete tests automatically is such an approach commonly proposed in research, developers may already have specific test scenarios in mind and thus just require help in selecting the most suitable test assertions for these scenarios. This can be done using deep learning models to predict assertions for given test code. Prior research on assertion generation trained these models specifically for the task, raising the question how much the use of larger models pre-trained on code that have emerged since then can improve their performance. In particular, while abstracting identifiers has been shown to improve specifically trained models, it remains unclear whether this also generalises to models pre-trained on non-abstracted code. Finally, even though prior work demonstrated high accuracy it remains unclear how this translates into the effectiveness of the assertions at their intended application – finding faults. To shed light on these open questions, in this paper we propose AsserT5, a new model based on the pre-trained CodeT5 model, and use this to empirically study assertion generation. We find that the abstraction and the inclusion of the focal method are useful also for a fine-tuned pre-trained model, resulting in test assertions that match the ground truth assertions precisely in up to 59.5% of cases, more than twice as precise as prior models. However, evaluation on real bugs from the Defects4J dataset shows that out of 138 bugs detectable with assertions in real-world projects, AsserT5 was only able to suggest fault-finding assertions for 33, indicating the need for further improvements. Severin Primbs, Benedikt Fein, Gordon Fraser 0001 |
AST | 3 |
| 2025 | Teaching Loop Testing to Young Learners with the Code Critters Mutation Testing GameabstractSerious games can teach essential coding and testing concepts even to younger audiences. In the Code Critters game critters execute short snippets of block-based code while traversing the game map, and players position magical portals (akin to test oracles) at locations (akin to test inputs) to distinguish between critters executing correct code from those who execute faulty code. However, this adaptation of the tower defense genre limits code under test to basic sequences and branches, and excludes the fundamental programming concept of loops. To address this limitation, in this paper we introduce an entirely new game concept integrated into the Code Critters storyline, tasking players to test the behavior of critters collecting ingredients for a healing potion using loop-based recipes at a second-stage level. In a study involving 29 secondary school students, we observed active engagement with these new loop-integrated levels. The results highlight challenges the students face, which can inform future strategies for improving coding and testing education. Philipp Straubinger, Lena Bloch, Gordon Fraser 0001 |
CSEE&T | 3 |
| 2025 | Increasing the Effectiveness of Automatically Generated Tests by Improving Class ObservabilityabstractAutomated unit test generation consists of two complementary challenges: Finding sequences of API calls that exercise the code of a class under test, and finding assertion statements that validate the behavior of the class during execution. The former challenge is often addressed using meta-heuristic search algorithms optimising tests for code coverage, which are then annotated with regression assertions to address the latter challenge, i.e., assertions that capture the states observed during test generation. While the resulting tests tend to achieve high coverage, their fault finding potential is often inhibited by poor or difficult observability of the codebase. That is, relevant attributes and properties may either not be exposed adequately at all, or only in ways that the test generator is unable to handle. In this paper, we investigate the influence of observability in the context of the EvoSuite search-based Java test generator, which we extend in two complementary ways to study and improve observability: First, we apply a transformation to code under test to expose encapsulated attributes to the test generator; second, we address EvoSuite's limited capability of asserting the state of complex objects. Our evaluation demonstrates that together these observability improvements lead to significantly increased mutation scores, underscoring the importance of considering the class observability in the test generation process. Geraldine Galindo-Gutiérrez, Juan Pablo Sandoval Alcocer, Nicolas Jimenez-Fuentes, Alexandre Bergel, Gordon Fraser 0001 |
ICSE | 5 |
| 2025 | Improving Merge Pipeline Throughput in Continuous Integration via Pull Request PrioritizationabstractIntegrating changes into large monolithic software repositories is a critical step in modern software development that substantially impacts the speed of feature delivery, the stability of the codebase, and the overall productivity of development teams. To ensure the stability of the main branch, many organizations use merge pipelines that test software versions before the changes are permanently integrated. However, the load on merge pipelines is often so high that they become bottlenecks, despite the use of parallelization. Existing optimizations frequently rely on specific build systems, limiting their generalizability and applicability. In this paper we propose to optimize the order of PRs in merge pipelines using practical build predictions utilizing only historical build data, PR metadata, and contextual information to estimate the likelihood of successful builds in the merge pipeline. By dynamically prioritizing likely passing PRs during peak hours, this approach maximizes throughput when it matters most. Experiments conducted on a real-world, large-scale project demonstrate that predictive ordering significantly outperforms traditional first-in-first-out (FIFO), as well as non-learning-based ordering strategies. Unlike alternative optimizations, this approach is agnostic to the underlying build system and thus easily integrable into existing automated merge pipelines. Maximilian Jungwirth, Martin Gruber, Gordon Fraser 0001 |
ICSME | 3 |
| 2025 | Many-Objective Neuroevolution for Testing GamesabstractGames are designed to challenge human players, but this also makes it challenging to generate software tests for computer games automatically. Neural networks have therefore been proposed to serve as dynamic test cases trained to reach statements in the underlying code, similar to how static test cases consisting of event sequences would do in traditional software. The Neatest approach combines search-based software testing principles with neuroevolution to generate such dynamic test cases. However, it may take long or even be impossible to evolve a network that can cover individual program statements, and since Neatest is a single-objective algorithm, it will have to be sequentially invoked for a potentially large number of coverage goals. In this paper, we therefore propose to treat the neuroevolution of dynamic test cases as a many-objective search problem. By targeting all coverage goals at the same time, easy goals are covered quickly, and the search can focus on more challenging ones. We extend the state-of-the-art many-objective test generation algorithms MIO and MOSA as well as the state-of-the-art many-objective neuroevolution algorithm NEWS/D to generate dynamic test cases. Experiments on 20 Scratch games show that targeting several objectives simultaneously increases Neatest's average branch coverage from 75.88% to 81.33% while reducing the search time by 93.28%. Patric Feldmeier, Katrin Schmelz, Gordon Fraser 0001 |
ICST | 3 |
| 2025 | Practical Pipeline-Aware Regression Test Optimization for Continuous IntegrationabstractMassive, multi-language, monolithic repositories form the backbone of many modern, complex software systems. To ensure consistent code quality while still allowing fast development cycles, Continuous Integration (CI) is commonly applied. However, operating CI at such scale not only leads to a single point of failure for many developers, but also requires computational resources that may reach feasibility limits and cause long feedback latencies. To address these issues, developers commonly split test executions across multiple pipelines, running small and fast tests in pre-submit stages while executing long-running and flaky tests in post-submit pipelines. Given the long runtimes of many pipelines and the substantial proportion of passing test executions (98 % in our pre-submit pipelines), there not only a need but also potential for further improvements by prioritizing and selecting tests. However, many previously proposed regression optimization techniques are unfit for an industrial context, because they (1) rely on complex and difficult-to-obtain features like per-test code coverage that are not feasible in large, multi-language environments, (2) do not automatically adapt to rapidly changing systems where new tests are continuously added or modified, and (3) are not designed to distinguish the different objectives of pre- and post-submit pipelines: While pre-submit testing should prioritize failing tests, post-submit pipelines should prioritize tests that indicate non-flaky changes by transitioning from pass to fail outcomes or vice versa. To overcome these issues, we developed a lightweight and pipeline-aware regression test optimization approach that employs Reinforcement Learning models trained on language-agnostic features. We evaluated our approach on a large industry dataset collected over a span of 20 weeks of CI test executions. When predicting the failure likelihood in pre-submit pipelines, our approach scheduled the first failing test within the first 16 % of tests, outperforming existing approaches. When predicting test transitions in the post-submit pipeline, it was able to select 87 % of developer-relevant tests by cutting the test execution time in half and over 99 % within five cycles. Daniel Schwendner, Maximilian Jungwirth, Martin Gruber, Martin Knoche, Daniel Merget, Gordon Fraser 0001 |
ICST | 6 |
| 2025 | LitterBox+: An Extensible Framework for LLM-enhanced Scratch Static Code Analysis
Benedikt Fein, Florian Obermüller, Gordon Fraser 0001 |
ASE | 3 |
| 2025 | Constraint-Guided Unit Test Generation for Machine Learning Libraries
Lukas Krodinger, Altin Hajdari, Stephan Lukasczyk, Gordon Fraser 0001 |
SSBSE | 4 |
| 2025 | Search-based Hyperparameter Tuning for Python Unit Test Generation
Stephan Lukasczyk, Gordon Fraser 0001 |
SSBSE | 2 |
| 2025 | A Retrospective on Whole Test Suite Generation: On the Role of SBST in the Age of LLMsabstractThis paper presents a retrospective of the article“Whole Test Suite Generation”, published in the IEEE Transactions on Software Engineering, in 2012. We summarize its main contributions, and discuss how this work impacted the research field of Search-Based Software Testing (SBST) in the last 12 years. The novel techniques presented in the paper were implemented in the tool EvoSuite, which has been so far the state-of-the-art in unit test generation for Java programs using SBST. SBST has shown practical and impactful applications, creating the foundations to open the doors to tackle several other software testing problems besides unit testing, like for example system testing of Web APIs with EvoMaster. We conclude our retrospective with our reflections on what lies ahead, especially considering the important role that SBST still plays even in the age of Large Language Models (LLMs). Gordon Fraser 0001, Andrea Arcuri |
IEEE Trans. Software Eng. | 1 |
| 2024 | WallMauer: Robust Code Coverage Instrumentation for Android AppsabstractCode coverage is the primary metric used to assess the quality of test suites, and it is the foundation of many automated techniques ranging from fault localization to search-based optimization approaches. Code coverage is measured by inserting probes into programs which keep track of executed code when running tests. While this can be easily done in many testing domains, it remains a challenging task for Android apps, mainly due to the nature of the Dalvik bytecode used for Android apps: First, the internal handling of registers inhibits common types of probes. To circumvent this problem, existing tools often rely on conversion of Dalvik bytecode to standard Java bytecode or source code, but during the conversion back to Dalvik bytecode errors and inconsistencies may occur. Furthermore, a strict limit of the number of methods and classes contained in a single archive of Dalvik bytecode (DEX file) requires spliting apps into multiple such DEX files (multidex approach), which is rarely supported by existing coverage instrumentation frameworks. This is not only a problem when trying to instrument regular multidex apps, but the coverage instrumentation itself increases the number of methods, potentially requiring a multidex solution even for apps that would otherwise fit in a single DEX file. In this paper we present WallMauer, a new code coverage tool that overcomes these limitations: It supports multidex, and avoids inconsistencies by rigorously instrumenting Dalvik byte-code directly. WallMauer solely requires an APK file as input and as such it can be easily integrated into any existing testing environment. Using a set of 1000 open source apps from the F-Droid repository we demonstrate that WallMauer is extremely robust, successfully instrumenting more than 99% of apps, more than any other state-of-the-art instrumentation framework. Michael Auer, Iván Arcuschin, Gordon Fraser 0001 |
AST | 3 |
| 2024 | Acknowledging Good Java Code with Code PerfumesabstractJava remains one of the most popular programming languages in education. Although Java programming education is well supported by study materials, learners also need more immediate support on the problems they face in their own code. When this support cannot be offered by educators personally, learners can resort to automated program analysis tools such as linters, which provide feedback on potential bugs or code issues. This is constructive feedback, but it may nevertheless feel like criticism. This paper introduces code perfumes for Java, a simple program analysis technique similar to linting, but commending the correct application of good programming practices. We present a catalogue of 20 Java code perfumes related to common Java language constructs for beginner to immediate learners. Our evaluation shows that these code perfumes occur frequently in learners' code, and programs with more code perfume instances tend to have better functionality and readability. Moreover, students who incorporate more code perfumes tend to achieve higher grades. Thus, code perfumes serve as a valuable tool to acknowledge learners' successes, and as a means to inform instructors about their learners' progress. Philipp Straubinger, Florian Obermüller, Gordon Fraser 0001 |
CSEE&T | 3 |
| 2024 | An Empirical Study on How Large Language Models Impact Software Testing LearningabstractSoftware testing is a challenging topic in software engineering education and requires creative approaches to engage learners. For example, the Code Defenders game has students compete over a Java class under test by writing effective tests and mutants. While such gamified approaches deal with problems of motivation and engagement, students may nevertheless require help to put testing concepts into practice. The recent widespread diffusion of Generative AI and Large Language Models raises the question of whether and how these disruptive technologies could address this problem, for example, by providing explanations of unclear topics and guidance for writing tests. However, such technologies might also be misused or produce inaccurate answers, which would negatively impact learning. To shed more light on this situation, we conducted the first empirical study investigating how students learn and practice new software testing concepts in the context of the Code Defenders testing game, supported by a smart assistant based on a widely known, commercial Large Language Model. Our study shows that students had unrealistic expectations about the smart assistant, “blindly” trusting any output it generated, and often trying to use it to obtain solutions for testing exercises directly. Consequently, students who resorted to the smart assistant more often were less effective and efficient than those who did not. For instance, they wrote 8.6% fewer tests, and their tests were not useful in 78.0% of the cases. We conclude that giving unrestricted and unguided access to Large Language Models might generally impair learning. Thus, we believe our study helps to raise awareness about the implications of using Generative AI and Large Language Models in Computer Science Education and provides guidance towards developing better and smarter learning tools. Simone Mezzaro, Alessio Gambi, Gordon Fraser 0001 |
EASE | 3 |
| 2024 | Search-based Crash Reproduction for Android AppsabstractAndroid apps are known to be fragile: Users as well as automated test generators frequently encounter app crashes. An important prerequisite for fixing the underlying faults is to provide developers with automated tests to reliably reproduce such crashes. Unfortunately, often the only information available is the stack trace of the crash. While search-based test generation has been successfully used for finding tests that reproduce crashes from stack traces in other domains, such approaches are fundamentally limited in their applicability on Android apps. For example, even the basic search operator of crossover used in evolutionary algorithms is challenged since applicable inputs depend on the state of the app, such that sequences of inputs cannot be arbitrarily concatenated. To overcome this problem we use an estimation of distribution search algorithm, which guides the reproduction using a probabilistic model of relevant actions, requiring no complicated search operators. The probabilistic model is bootstrapped using established Android testing heuristics and crash-related information extracted from the stack trace and byte code, and is updated throughout the search using a fitness function based on stack traces. Evaluation on 30 real-world app crashes, of which 24 are successfully reproduced, demonstrates that the approach is effective, reliable and fast. Michael Auer, Dominik Diner, Gordon Fraser 0001 |
GECCO | 3 |
| 2024 | NuzzleBug: Debugging Block-Based Programs in ScratchabstractWhile professional integrated programming environments support developers with advanced debugging functionality, block-based programming environments for young learners often provide no support for debugging at all, thus inhibiting debugging and preventing debugging education. In this paper we introduce NuzzleBug, an extension of the popular block-based programming environment Scratch that provides the missing debugging support. NuzzleBug allows controlling the executions of Scratch programs with classical debugging functionality such as stepping and breakpoints, and it is an omniscient debugger that also allows reverse stepping. To support learners in deriving hypotheses that guide debugging, NuzzleBug is an interrogative debugger that enables to ask questions about executions and provides answers explaining the behavior in question. In order to evaluate NuzzleBug, we survey the opinions of teachers, and study the effects on learners in terms of debugging effectiveness and efficiency. We find that teachers consider NuzzleBug to be useful, and children can use it to debug faulty programs effectively. However, systematic debugging requires dedicated training, and even when NuzzleBug can provide correct answers learners may require further help to comprehend faults and necessary fixes, thus calling for further research on improving debugging techniques and the information they provide. Adina Deiner, Gordon Fraser 0001 |
ICSE | 2 |
| 2024 | Do Automatic Test Generation Tools Generate Flaky Tests?abstractNon-deterministic test behavior, or flakiness, is common and dreaded among developers. Researchers have studied the issue and proposed approaches to mitigate it. However, the vast majority of previous work has only considered developer-written tests. The prevalence and nature of flaky tests produced by test generation tools remain largely unknown. We ask whether such tools also produce flaky tests and how these differ from developer-written ones. Furthermore, we evaluate mechanisms that suppress flaky test generation. We sample 6 356 projects written in Java or Python. For each project, we generate tests using EvoSuite (Java) and Pynguin (Python), and execute each test 200 times, looking for inconsistent outcomes. Our results show that flakiness is at least as common in generated tests as in developer-written tests. Nevertheless, existing flakiness suppression mechanisms implemented in EvoSuite are effective in alleviating this issue (71.7 % fewer flaky tests). Compared to developer-written flaky tests, the causes of generated flaky tests are distributed differently. Their non-deterministic behavior is more frequently caused by randomness, rather than by networking and concurrency. Using flakiness suppression, the remaining flaky tests differ significantly from any flakiness previously reported, where most are attributable to runtime optimizations and EvoSuite-internal resource thresholds. These insights, with the accompanying dataset, can help maintainers to improve test generation tools, give recommendations for developers using these tools, and serve as a foundation for future research in test flakiness or test generation. Martin Gruber, Muhammad Firhard Roslan, Owain Parry, Fabian Scharnböck, Phil McMinn, Gordon Fraser 0001 |
ICSE | 6 |
| 2024 | Improving Testing Behavior by Gamifying IntelliJabstractTesting is an important aspect of software development, but unfortunately, it is often neglected. While test quality analyses such as code coverage or mutation analysis inform developers about the quality of their tests, such reports are viewed only sporadically during continuous integration or code review, if they are considered at all, and their impact on the developers' testing behavior therefore tends to be negligible. To actually influence developer behavior, it may rather be necessary to motivate developers directly within their programming environment, while they are coding. We introduce IntelliGame, a gamified plugin for the popular IntelliJ Java Integrated Development Environment, which rewards developers for positive testing behavior using a multi-level achievement system: A total of 27 different achievements, each with incremental levels, provide affirming feedback when developers exhibit commendable testing behavior, and provide an incentive to further continue and improve this behavior. A controlled experiment with 49 participants given a Java programming task reveals substantial differences in the testing behavior triggered by IntelliGame: Incentivized developers write more tests, achieve higher coverage and mutation scores, run their tests more often, and achieve functionality earlier. Philipp Straubinger, Gordon Fraser 0001 |
ICSE | 2 |
| 2024 | Brewing Up Reliability: Espresso Test Generation for Android AppsabstractThe ESPRESSO testing framework for ANDROID has gained popularity among developers as it allows to write concise and reliable VI tests. State-of-the-art tools for automatically testing ANDROID apps, however, tend to produce crash reports rather than human-readable tests, and even if they produce tests these (1) rarely use the ESPRESSO format; (2) are often unreliable due to the volatile nature of widget identifiers; and (3) usually contain no test assertions to serve as regression oracles. While the lack of ESPRESSO support of test generation tools has been addressed by reverse engineering ESPRESSO tests, the other problems remain even with this workaround. In this paper, we therefore introduce a novel ESPREsso-based representation that allows test generators to generate ESPRESSO test cases directly that (1) can reliably identify widgets using clear and concise ESPRESSO selectors, and (2) can check test executions using ESPRESSO assertions. Experiments on 1,035 ANDROID apps demonstrate that the proposed approach generates ESPRESSO tests that are significantly more reliable than reverse engineered tests, and the ESPRESSO assertions of the generated tests are effective at detecting faults in ANDROID apps. Iván Arcuschin, Lisandro Di Meo, Michael Auer, Juan P. Galeotti, Gordon Fraser 0001 |
ICST | 5 |
| 2024 | "Help Me Solve It" or "Solve It For Me": Effects of Feedback on Children Building and Programming RobotsabstractComputer science related topics are increasingly introduced at elementary school level, aiming not only to establish basic knowledge, but also to foster affective aspects such as motivation or self-efficacy. While corrective feedback is helpful to achieve the former, it may negatively impact the latter. This raises the question on how to provide feedback in an encouraging way that makes learners feel competent but also autonomous. To shed light on this question, we conducted a robotics course with 45 children aged nine to eleven years, in which we studied their preferences when given a choice of either solving a problem themselves (with only a hint from the tutor) or being given the solution directly.We find that children like the freedom of choice and slightly prefer solving their problems themselves, which in turn is significantly correlated with a higher improvement in self-efficacy for building and programming robots. Interestingly, however, only girls exhibit a significant correlation with resulting knowledge on building, and only eleven year old children with resulting knowledge on programming. These insights allow us to provide concrete recommendations on how to give feedback and involve elementary school children and their preferences to promote both knowledge and self-efficacy. Luisa Greifenstein, Isabella Graßl, Ute Heuer, Gordon Fraser 0001 |
SIGCSE (1) | 4 |
| 2024 | Hint Cards for Common Ozobot Robot Issues: Supporting Feedback for Learning Programming in Elementary SchoolsabstractComputational thinking is gradually being introduced into elementary school curricula, usually accompanied by some form of programming activity. However, even a creative and hands-on activity such as programming Ozobot robots with color codes requires elementary school teachers to provide adequate help. We therefore developed hint cards based on criteria for effective feedback and common color code mode issues. Based on our experience of using the hint cards in 17 workshops in elementary schools with 328 children and 21 educators, we identify how the hint cards (1) address feedback challenges, (2) support learning, and (3) can be adapted for broader use. We find that hint cards provide benefits at the teacher, learner and organizational level, but also identify possible disadvantageous circumstances. Although the hint cards support learning regarding affective, cognitive and meta-cognitive aspects, strategies for adaptation are needed. We discuss how the hint cards can be used in other contexts, and give recommendations on how to use the knowledge of common issues and hint cards for supporting elementary school teachers with teaching programming. Luisa Greifenstein, Ute Heuer, Gordon Fraser 0001 |
SIGCSE (1) | 3 |
| 2024 | Many Independent Objective Estimation of Distribution Search for Android Testing
Michael Auer, Andreas Strobl, Gordon Fraser 0001 |
SSBSE | 3 |
| 2023 | Debugging Flaky Tests using Spectrum-based Fault LocalizationabstractNon-deterministically behaving (i.e., flaky) tests hamper regression testing as they destroy trust and waste computational and human resources. Eradicating flakiness in test suites is therefore an important goal, but automated debugging tools are needed to support developers when trying to understand the causes of flakiness. A popular example for an automated approach to support regular debugging is spectrum-based fault localization (SFL), a technique that identifies software components that are most likely the causes of failures. While it is possible to also apply SFL for locating likely sources of flakiness in code, unfortunately the flakiness makes SFL both imprecise and non-deterministic. In this paper we introduce SFFL (Spectrum-based Flaky Fault Localization), an extension of traditional coverage-based SFL that exploits our observation that 80% of flaky tests exhibit varying coverage behavior between different runs. By distinguishing between stable and flaky coverage, SFFL is able to locate the sources of flakiness more precisely and keeps the localization itself deterministic. An evaluation on 101 flaky tests taken from 48 open-source Python projects demonstrates that SFFL is effective: Of five prominent SFL formulas, DStar, Ochiai, and Op2 yield the best overall performance. On average, they are able to narrow down the fault’s location to 3.5% of the project’s code base, which is 18.7% better than traditional SFL (for DStar). SFFL’s effectiveness, however, depends on the root causes of flakiness: The source of non-order-dependent flaky tests can be located far more precisely than order-dependent faults. Martin Gruber, Gordon Fraser 0001 |
AST | 2 |
| 2023 | Learning by Viewing: Generating Test Inputs for Games by Integrating Human Gameplay Traces in NeuroevolutionabstractAlthough automated test generation is common in many programming domains, games still challenge test generators due to their heavy randomisation and hard-to-reach program states. Neuroevolution combined with search-based software testing principles has been shown to be a promising approach for testing games, but the co-evolutionary search for optimal network topologies and weights involves unreasonably long search durations. In this paper, we aim to improve the evolutionary search for game input generators by integrating knowledge about human gameplay behaviour. To this end, we propose a novel way of systematically recording human gameplay traces, and integrating these traces into the evolutionary search for networks using traditional gradient descent as a mutation operator. Experiments conducted on eight diverse Scratch games demonstrate that the proposed approach reduces the required search time from five hours down to only 52 minutes. Patric Feldmeier, Gordon Fraser 0001 |
GECCO | 2 |
| 2023 | On the Applicability of Language Models to Block-Based ProgramsabstractBlock-based programming languages like Scratch are increasingly popular for programming education and end-user programming. Recent program analyses build on the insight that source code can be modelled using techniques from natural language processing. Many of the regularities of source code that support this approach are due to the syntactic overhead imposed by textual programming languages. This syntactic overhead, however, is precisely what block-based languages remove in order to simplify programming. Consequently, it is unclear how well this modelling approach performs on block-based programming languages. In this paper, we investigate the applicability of language models for the popular block-based programming language Scratch. We model Scratch programs using n-gram models, the most essential type of language model, and transformers, a popular deep learning model. Evaluation on the example tasks of code completion and bug finding confirm that blocks inhibit predictability, but the use of language models is nevertheless feasible. Our findings serve as foundation for improving tooling and analyses for block-based languages. Elisabeth Griebl, Benedikt Fein, Florian Obermüller, Gordon Fraser 0001, René Just |
ICSE | 4 |
| 2023 | Android Fuzzing: Balancing User-Inputs and IntentsabstractAndroid apps can be effectively tested by randomly generating inputs and triggering corresponding events. Most test generators focus on user-triggered events, such as button clicks. However, the state of an app is not only determined by the interactions with a user, but also inputs from the system and other apps, which are called intents in Android. Intent fuzzing, that is, the automated generation of randomized intents as test inputs, has been demonstrated to be an effective means for identifying crashes in apps. However, the behavior of intent handlers is influenced by the state of the app, which may depend on the user’s interactions with the app that triggers corresponding events. Recent test generators have therefore started integrating some of both types of events, leaving open questions about the best way to combine and balance UI inputs and intents. In this paper, we describe a general framework for integrating user events and intents for testing Android apps. We study empirically how to best combine these two types of events, and evaluate the effectiveness of the combination. Our experiments suggest that combining UI inputs and intents reveals substantially higher code coverage as well as more unique crashes (844 on 500 F-Droid apps) than sending only user-events (762) or only intents (511): The combined approach achieves a magnitude higher activity coverage (78.07%) than using only user inputs (70.45%) and sending only intents (58.23%). Furthermore, 121 unique crashes were found only through the combination of UI inputs and intents. Although intent crashes and UI crashes result from similar exception types, they are distinct, which is relevant when comparing test generators. Michael Auer, Andreas Stahlbauer, Gordon Fraser 0001 |
ICST | 3 |
| 2023 | Practical Flaky Test Prediction using Common Code Evolution and Test History DataabstractNon-deterministically behaving test cases cause developers to lose trust in their regression test suites and to eventually ignore failures. Detecting flaky tests is therefore a crucial task in maintaining code quality, as it builds the necessary foundation for any form of systematic response to flakiness, such as test quarantining or automated debugging. Previous research has proposed various methods to detect flakiness, but when trying to deploy these in an industrial context, their reliance on instrumentation, test reruns, or language-specific artifacts was inhibitive. In this paper, we therefore investigate the prediction of flaky tests without such requirements on the underlying programming language, CI, build or test execution framework. Instead, we rely only on the most commonly available artifacts, namely the tests’ outcomes and durations, as well as basic information about the code evolution to build predictive models capable of detecting flakiness. Furthermore, our approach does not require additional reruns, since it gathers this data from existing test executions. We trained several established classifiers on the suggested features and evaluated their performance on a large-scale industrial software system, from which we collected a data set of 100 flaky and 100 non-flaky test- and code-histories. The best model was able to achieve an F1-score of 95.5% using only 3 features: the tests’ flip rates, the number of changes to source files in the last 54 days, as well as the number of changed files in the most recent pull request. Martin Gruber, Michael Heine, Norbert Oster, Michael Philippsen, Gordon Fraser 0001 |
ICST | 5 |
| 2023 | A Survey on What Developers Think About TestingabstractSoftware is infamous for its poor quality and frequent occurrence of bugs. While there is no doubt that thorough testing is an appropriate answer to ensure sufficient quality, the poor state of software generally suggests that developers may not always engage as thoroughly with testing as they should. This observation aligns with the prevailing belief that developers simply do not like writing tests. In order to determine the truth of this belief, we conducted a comprehensive survey with 21 questions aimed at (1) assessing developers’ current engagement with testing and (2) identifying factors influencing their inclination toward testing; that is, whether they would actually like to test more but are inhibited by their work environment, or whether they would really prefer to test even less if given the choice. Drawing on 284 responses from professional software developers, we uncover reasons that positively and negatively impact developers’ motivation to test. Notably, reasons for motivation to write more tests encompass not only a general pursuit of software quality but also personal satisfaction. However, developers nevertheless perceive testing as mundane and tend to prioritize other tasks. One approach emerging from the responses to mitigate these negative factors is by providing better recognition for developers’ testing efforts. Philipp Straubinger, Gordon Fraser 0001 |
ISSRE | 2 |
| 2023 | ScratchLog: Live Learning Analytics for ScratchabstractScratch is a hugely popular block-based programming environment that is often used in educational settings, and has therefore recently also become a focus for research on programming education. Scratch provides dedicated teacher accounts that make it easy and convenient to handle lessons with school classes. However, once learners join a Scratch classroom, it is challenging to keep track of what they are doing: Both teachers and researchers may be interested in learning analytics to help them monitor students or evaluate teaching material. Researchers may also be interested in understanding how programs are created and how learners use Scratch. Neither use case is supported by Scratch itself currently. In this paper, we introduce ScratchLog, a tool that collects data from learners using Scratch. ScratchLog provides custom user management and makes it easy to set up courses and assignments. Starting from a task description and a starter project, learners transparently use Scratch while ScratchLog collects usage data, such as the history of code edits, or statistics about how the Scratch user interface was used. This data can be viewed on the ScratchLog web interface, or exported for further analysis, for example to inspect the functionality of programs using automated tests. Laura Caspari, Luisa Greifenstein, Ute Heuer, Gordon Fraser 0001 |
ITiCSE (1) | 4 |
| 2023 | Exploring Programming Task Creation of Primary School Teachers in TrainingabstractIntroducing computational thinking in primary school curricula implies that teachers have to prepare appropriate lesson material. Typically this includes creating programming tasks, which may overwhelm primary school teachers with lacking programming subject knowledge. Inadequate resulting example code may negatively affect learning, and students might adopt bad programming habits or misconceptions. To avoid this problem, automated program analysis tools have the potential to help scaffolding task creation processes. For example, static program analysis tools can automatically detect both good and bad code patterns, and provide hints on improving the code. To explore how teachers generally proceed when creating programming tasks, whether tool support can help, and how it is perceived by teachers, we performed a pre-study with 26 and a main study with 59 teachers in training and the LitterBox static analysis tool for Scratch. We find that teachers in training (1) often start with brainstorming thematic ideas rather than setting learning objectives, (2) write code before the task text, (3) give more hints in their task texts and create fewer bugs when supported by LitterBox, and (4) mention both positive aspects of the tool and suggestions for improvement. These findings provide an improved understanding of how to inform teacher training with respect to support needed by teachers when creating programming tasks. Luisa Greifenstein, Ute Heuer, Gordon Fraser 0001 |
ITiCSE (1) | 3 |
| 2023 | Effects of Automated Feedback in Scratch Programming TutorialsabstractBlock-based programming languages like Scratch are commonly used to introduce young learners to programming. While coding, learners may encounter problems, which may require teachers to intervene. However, teachers may be overwhelmed with help requests in a classroom setting, and in independent learning scenarios, teachers may not be available at all. Automated tutoring systems aim to help by providing hints, but misleading or confusing hints can be detrimental. To better understand the effects of automatically generated hints, in this paper we study a state-of-the-art hint generation system that provides suggestions when learners fail to complete a step in a programming tutorial. The system is evaluated using two cohorts of students aged 12-13, where one cohort receives only textual hints based on test failures while the other additionally receives visual next-step support in terms of illustrated code changes. We find that initially the automatically generated visual next-step hints increase the speed at which learners complete the steps of the tutorial and reduce the number of questions posed to teachers, without affecting the learners' overall understanding of their program negatively. However, with increasing complexity of the programs the quality of the hints degrades, thus calling for further research on improving hint generation systems. Florian Obermüller, Luisa Greifenstein, Gordon Fraser 0001 |
ITiCSE (1) | 3 |
| 2023 | Generating Android Tests Using Novelty Search
Michael Auer, Michael Pusl, Gordon Fraser 0001 |
SSBSE | 3 |
| 2023 | Automated test generation for Scratch programsabstractAbstract The importance of programming education has led to dedicated educational programming environments, where users visually arrange block-based programming constructs that typically control graphical, interactive game-like programs. TheScratchprogramming environment is particularly popular, with more than 90 million registered users at the time of this writing. While the block-based nature ofScratchhelps 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. In prior work we introducedWhisker, a framework that enables automated testing ofScratchprograms. However, creating these automated tests forScratchprograms is challenging. In this paper, we therefore investigate how to automatically generateWhiskertests. Generating tests forScratchraises important challenges: First, game-like programs are typically randomised, leading to flaky tests. Second,Scratchprograms usually consist of animations and interactions with long delays, inhibiting the application of classical test generation approaches. Thus, the new application domain raises the question of which test generation technique is best suited to produce high coverage tests capable of detecting faulty behaviour. We investigate these questions using an extension of theWhiskertest framework for automated test generation. Evaluation on common programming exercises, a random sample of 1000Scratchuser programs, and the 1000 most popularScratchprograms demonstrates that our approach enablesWhiskerto reliably accelerate test executions, and even though manyScratchprograms 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. Adina Deiner, Patric Feldmeier, Gordon Fraser 0001, Sebastian Schweikl, Wengran Wang |
Empir. Softw. Eng. | 3 |
| 2023 | An empirical study of automated unit test generation for PythonabstractAbstract Various mature automated test generation tools exist for statically typed programming languages such as Java. Automatically generating unit tests for dynamically typed programming languages such as Python, however, is substantially more difficult due to the dynamic nature of these languages as well as the lack of type information. Our Pynguin framework provides automated unit test generation for Python. In this paper, we extend our previous work on Pynguin to support more aspects of the Python language, and by studying a larger variety of well-established state of the art test-generation algorithms, namely DynaMOSA, MIO, and MOSA. Furthermore, we improved our Pynguin tool to generate regression assertions, whose quality we also evaluate. Our experiments confirm that evolutionary algorithms can outperform random test generation also in the context of Python, and similar to the Java world, DynaMOSA yields the highest coverage results. However, our results also demonstrate that there are still fundamental remaining issues, such as inferring type information for code without this information, currently limiting the effectiveness of test generation for Python. Stephan Lukasczyk, Florian Kroiß, Gordon Fraser 0001 |
Empir. Softw. Eng. | 3 |
| 2022 | An Evaluation of code2vec Embeddings for Scratch
Benedikt Fein, Isabella Graßl, Florian Beck, Gordon Fraser 0001 |
EDM | 4 |
| 2022 | Model-based Testing of Scratch ProgramsabstractLearners are often introduced to programming via dedicated languages such as SCRATCH, where block-based commands are assembled visually in order to control the interactions of graphical sprites. Automated testing of such programs is an important prerequisite for supporting debugging, providing hints, or assessing learning outcomes. However, writing tests for SCRATCH programs can be challenging: The game-like and randomised nature of typical SCRATCH programs makes it difficult to identify specific timed input sequences used to control the programs. Furthermore, precise test assertions to check the resulting program states are incompatible with the fundamental principle of creative freedom in programming in SCRATCH, where correct program behaviour may be implemented with deviations in the graphical appearance or timing of the program. The event-driven and actor-oriented nature of SCRATCH programs, however, makes them a natural fit for describing program behaviour using finite state machines. In this paper, we introduce a model-based testing approach by extending WHISKER, an automated testing framework for SCRATCH programs. The model-based extension describes expected program behaviour in terms of state machines, which makes it feasible to check the abstract behaviour of a program independent of exact timing and pixel-precise graphical details, and to automatically derive test inputs testing even challenging programs. A video demonstrating model-based testing with WHISKER is available at the following URL: https://youtu.be/edgCNbGSGEY Katharina Götz, Patric Feldmeier, Gordon Fraser 0001 |
ICST | 3 |
| 2022 | A Survey on How Test Flakiness Affects Developers and What Support They Need To Address ItabstractNon-deterministically passing and failing test cases, so-called flaky tests, have recently become a focus area of software engineering research. While this research focus has been met with some enthusiastic endorsement from industry, prior work nevertheless mostly studied flakiness using a code-centric approach by mining software repositories. What data extracted from software repositories cannot tell us, however, is how developers perceive flakiness: How prevalent is test flakiness in developers' daily routine, how does it affect them, and most importantly: What do they want us researchers to do about it? To answer these questions, we surveyed 335 professional software developers and testers in different domains. The survey respondents confirm that flaky tests are a common and serious problem, thus reinforcing ongoing research on flaky test detection. Developers are less worried about the computational costs caused by re-running tests and more about the loss of trust in the test outcomes. Therefore, they would like to have IDE plugins to detect flaky code as well as better visualizations of the problem, particularly dashboards showing test outcomes over time; they also wish for more training and information on flakiness. These important aspects will require the attention of researchers as well as tool developers. Martin Gruber, Gordon Fraser 0001 |
ICST | 2 |
| 2022 | CATNIP: An Automated Hint Generation Tool for ScratchabstractTaking the first steps when learning how to program can be hard. Block-based programming languages like Scratch lower this hurdle, but learners may nevertheless get stuck when trying to solve a specific task and need help. This can also challenge teachers when facing many raised hands at the same time in the classroom. Consequently, it is desirable for learners and teachers alike to have access to systems that automatically generate hints on which steps to take next in a programming assignment. In this paper we introduce Catnip, a tool that generates next step hints for the Scratch programming language based on a structural comparison between model solutions and the current student attempt. Catnip uses extensive postprocessing to improve the generated hints, and displays them directly inside the Scratch framework, suggesting where to add or reorder blocks while working on a programming task. Benedikt Fein, Florian Obermüller, Gordon Fraser 0001 |
ITiCSE (1) | 3 |
| 2022 | Neuroevolution-Based Generation of Tests and Oracles for GamesabstractGame-like programs have become increasingly popular in many software engineering domains such as mobile apps, web applications, or programming education. However, creating tests for programs that have the purpose of challenging human players is a daunting task for automatic test generators. Even if test generation succeeds in finding a relevant sequence of events to exercise a program, the randomized nature of games means that it may neither be possible to reproduce the exact program behavior underlying this sequence, nor to create test assertions checking if observed randomized game behavior is correct. To overcome these problems, we propose Neatest, a novel test generator based on the NeuroEvolution of Augmenting Topologies (NEAT) algorithm. Neatest systematically explores a program’s statements, and creates neural networks that operate the program in order to reliably reach each statement—that is, Neatest learns to play the game in a way to reliably cover different parts of the code. As the networks learn the actual game behavior, they can also serve as test oracles by evaluating how surprising the observed behavior of a program under test is compared to a supposedly correct version of the program. We evaluate this approach in the context of Scratch, an educational programming environment. Our empirical study on 25 non-trivial Scratch games demonstrates that our approach can successfully train neural networks that are not only far more resilient to random influences than traditional test suites consisting of static input sequences, but are also highly effective with an average mutation score of more than 65%. Patric Feldmeier, Gordon Fraser 0001 |
ASE | 2 |
| 2022 | Improving Search-Based Android Test Generation Using Surrogate Models
Michael Auer, Felix Adler, Gordon Fraser 0001 |
SSBSE | 3 |
| 2022 | Search-Based Test Suite Generation for Rust
Vsevolod Tymofyeyev, Gordon Fraser 0001 |
SSBSE | 2 |
| 2022 | Pinpoint: A Record, Replay, and Extract System to Support Code Comprehension and ReuseabstractBlock-based programming environments, such as Scratch and Snap!, engage users to create programming artifacts such as games and stories, and share them in an online community. Many Snap! users start programming by reusing and modifying an example project, but encounter many barriers when searching and identifying the relevant parts of the program to learn and reuse. We present Pinpoint, a system that helps Snap! programmers understand and reuse an existing program by isolating the code responsible for specific events during program execution. Specifically, a user can record an execution of the program (including user inputs and graphical output), replay the output, and select a specific time interval where the event of interest occurred, to view code that is relevant to this event. We conducted a small-scale user study to compare users’ program comprehension experience with and without Pinpoint, and found suggestive evidence that Pinpoint helps users understand and reuse a complex program more efficiently. Wengran Wang, Gordon Fraser 0001, Mahesh Bobbadi, Benyamin T. Tabarsi, Tiffany Barnes, Chris Martens 0001, Shuyin Jiao, Thomas W. Price |
VL/HCC | 2 |
| 2022 | Test smells 20 years later: detectability, validity, and reliabilityabstractAbstract Test smells aim to capture design issues in test code that reduces its maintainability. These have been extensively studied and generally found quite prevalent in both human-written and automatically generated test-cases. However, most evidence of prevalence is based on specific static detection rules. Although those are based on the original, conceptual definitions of the various test smells, recent empirical studies indicate that developers perceive warnings raised by detection tools as overly strict and non-representative of the maintainability and quality of test suites. This leads us to re-assess test smell detection tools’ detection accuracy and investigate the prevalence and detectability of test smells more broadly. Specifically, we construct a hand-annotated dataset spanning hundreds of test suites both written by developers and generated by two test generation tools ( EvoSuite and JTExpert ) and performed a multi-stage, cross-validated manual analysis to identify the presence of six types of test smells in these. We then use this manual labeling to benchmark the performance and external validity of two test smell detection tools—one widely used in prior work and one recently introduced with the express goal to match developer perceptions of test smells. Our results primarily show that the current vocabulary of test smells is highly mismatched to real concerns: multiple smells were ubiquitous on developer-written tests but virtually never correlated with semantic or maintainability flaws; machine-generated tests actually often scored better, but in reality, suffered from a host of problems not well-captured by current test smells. Current test smell detection strategies poorly characterized the issues in these automatically generated test suites; in particular, the older tool’s detection strategies misclassified over 70% of test smells, both missing real instances (false negatives) and marking many smell-free tests as smelly (false positives). We identify common patterns in these tests that can be used to improve the tools, refine and update the definition of certain test smells, and highlight as of yet uncharacterized issues. Our findings suggest the need for (i) more appropriate metrics to match development practice, (ii) more accurate detection strategies to be evaluated primarily in industrial contexts. Annibale Panichella, Sebastiano Panichella, Gordon Fraser 0001, Anand Ashok Sawant, Vincent J. Hellendoorn |
Empir. Softw. Eng. | 3 |
| 2022 | Practical Mutation Testing at Scale: A view from GoogleabstractMutation analysis assesses a test suite’s adequacy by measuring its ability to detect small artificial faults, systematically seeded into the tested program. Mutation analysis is considered one of the strongest test-adequacy criteria. Mutation testing builds on top of mutation analysis and is a testing technique that uses mutants as test goals to create or improve a test suite. Mutation testing has long been considered intractable because the sheer number of mutants that can be created represents an insurmountable problem–both in terms of human and computational effort. This has hindered the adoption of mutation testing as an industry standard. For example, Google has a codebase of two billion lines of code and more than 150,000,000 tests are executed on a daily basis. The traditional approach to mutation testing does not scale to such an environment; even existing solutions to speed up mutation analysis are insufficient to make it computationally feasible at such a scale. To address these challenges, this paper presents a scalable approach to mutation testing based on the following main ideas: (1) mutation testing is done incrementally, mutating onlychanged codeduring code review, rather than the entire code base; (2) mutants are filtered, removing mutants that are likely to be irrelevant to developers, and limiting the number of mutants per line and per code review process; (3) mutants are selected based on the historical performance of mutation operators, further eliminating irrelevant mutants and improving mutant quality. This paper empirically validates the proposed approach by analyzing its effectiveness in a code-review-based setting, used by more than 24,000 developers on more than 1,000 projects. The results show that the proposed approach produces orders of magnitude fewer mutants and that context-based mutant filtering and selection improve mutant quality and actionability. Overall, the proposed approach represents a mutation testing framework that seamlessly integrates into the software development workflow and is applicable to industrial settings of any size. Goran Petrovic, Marko Ivankovic, Gordon Fraser 0001, René Just |
IEEE Trans. Software Eng. | 3 |
| 2021 | Execution Trace Based Feature Engineering To Enable Formative Feedback on Visual, Interactive Programs
Wengran Wang, Gordon Fraser 0001, Tiffany Barnes, Chris Martens 0001, Thomas W. Price |
EDM | 2 |
| 2021 | Encoding the certainty of boolean variables to improve the guidance for search-based test generationabstractSearch-based test generation commonly uses fitness functions based on branch distances, i.e., estimations of how close conditional statements in a program are to evaluating to true or to false. When conditional statements depend on Boolean variables or Boolean-valued methods, the branch distance metric is unable to provide any guidance to the search, causing challenging plateaus in the fitness landscape. A commonly proposed solution is to apply testability transformations, which transform the program in a way that avoids conditional statements from depending on Boolean values. In this paper we introduce the concept of Certainty Booleans, which encode how certain a true or false Boolean value is. Using these Certainty Booleans, a basic testability transformation allows to restore gradients in the fitness landscape for Boolean branches, even when Boolean values are the result of complex interprocedural calculations. Evaluation on a set of complex Java classes and the EvoSuite test generator shows that this testability transformation substantially alters the fitness landscape for Boolean branches, and the altered fitness landscape leads to performance improvements. However, Boolean branches turn out to be much rarer than anticipated, such that the overall effects on code coverage are minimal. Sebastian Vogl, Sebastian Schweikl, Gordon Fraser 0001 |
GECCO | 3 |
| 2021 | Does mutation testing improve testing practices?abstractVarious proxy metrics for test quality have been defined in order to guide developers when writing tests. Code coverage is particularly well established in practice, even though the question of how coverage relates to test quality is a matter of ongoing debate. Mutation testing offers a promising alternative: Artificial defects can identify holes in a test suite, and thus provide concrete suggestions for additional tests. Despite the obvious advantages of mutation testing, it is not yet well established in practice. Until recently, mutation testing tools and techniques simply did not scale to complex systems. Although they now do scale, a remaining obstacle is lack of evidence that writing tests for mutants actually improves test quality. In this paper we aim to fill this gap: By analyzing a large dataset of almost 15 million mutants, we investigate how these mutants influenced developers over time, and how these mutants relate to real faults. Our analyses suggest that developers using mutation testing write more tests, and actively improve their test suites with high quality tests such that fewer mutants remain. By analyzing a dataset of past fixes of real high-priority faults, our analyses further provide evidence that mutants are indeed coupled with real faults. In other words, had mutation testing been used for the changes introducing the faults, it would have reported a live mutant that could have prevented the bug. Goran Petrovic, Marko Ivankovic, Gordon Fraser 0001, René Just |
ICSE | 3 |
| 2021 | An Empirical Study of Flaky Tests in PythonabstractTests that cause spurious failures without any code changes, i.e., flaky tests, hamper regression testing, increase maintenance costs, may shadow real bugs, and decrease trust in tests. While the prevalence and importance of flakiness is well established, prior research focused on Java projects, thus raising the question of how the findings generalize. In order to provide a better understanding of the role of flakiness in software development beyond Java, we empirically study the prevalence, causes, and degree of flakiness within software written in Python, one of the currently most popular programming languages. For this, we sampled 22 352 open source projects from the popular PyPI package index, and analyzed their 876 186 test cases for flakiness. Our investigation suggests that flakiness is equally prevalent in Python as it is in Java. The reasons, however, are different: Order dependency is a much more dominant problem in Python, causing 59 % of the 7 571 flaky tests in our dataset. Another 28 % were caused by test infrastructure problems, which represent a previously undocumented cause of flakiness. The remaining 13 % can mostly be attributed to the use of network and randomness APIs by the projects, which is indicative of the type of software commonly written in Python. Our data also suggests that finding flaky tests requires more runs than are often done in the literature: A 95 % confidence that a passing test case is not flaky on average would require 170 reruns. Martin Gruber, Stephan Lukasczyk, Florian Kroiß, Gordon Fraser 0001 |
ICST | 4 |
| 2021 | Guiding Next-Step Hint Generation Using Automated TestsabstractLearning basic programming with Scratch can be hard for novices and tutors alike: Students may not know how to advance when solving a task, teachers may face classrooms with many raised hands at a time, and the problem is exacerbated when novices are on their own in online or virtual lessons. It is therefore desirable to generate next-step hints automatically to provide individual feedback for students who are stuck, but current approaches rely on the availability of multiple hand-crafted or hand-selected sample solutions from which to draw valid hints, and have not been adapted for Scratch. Automated testing provides an opportunity to automatically select suitable candidate solutions for hint generation, even from a pool of student solutions using different solution approaches and varying in quality. In this paper we present Catnip, the first nextstep hint generation approach for Scratch, which extends existing data-driven hint generation approaches with automated testing. Evaluation of Catnip on a dataset of student Scratch programs demonstrates that the generated hints point towards functional improvements, and the use of automated tests allows the hints to be better individualized for the chosen solution path. Florian Obermüller, Ute Heuer, Gordon Fraser 0001 |
ITiCSE (1) | 3 |
| 2021 | SnapCheck: Automated Testing for Snap! ProgramsabstractProgramming environments such as Snap, Scratch, and Processing engage learners by allowing them to create programming artifacts such as apps and games, with visual and interactive output. Learning programming with such a media-focused context has been shown to increase retention and success rate. However, assessing these visual, interactive projects requires time and laborious manual effort, and it is therefore difficult to offer automated or real-time feedback to students as they work. In this paper, we introduce SnapCheck, a dynamic testing framework for Snap that enables instructors to author test cases with Condition-Action templates. The goal of SnapCheck is to allow instructors or researchers to author property-based test cases that can automatically assess students' interactive programs with high accuracy. Our evaluation of SnapCheck on 162 code snapshots from a Pong game assignment in an introductory programming course shows that our automated testing framework achieves at least 98% accuracy over all rubric items, showing potentials to use SnapCheck for auto-grading and providing formative feedback to students. Wengran Wang, Chenhao Zhang 0003, Andreas Stahlbauer, Gordon Fraser 0001, Thomas W. Price |
ITiCSE (1) | 4 |
| 2021 | Improving Readability of Scratch Programs with Search-based RefactoringabstractBlock-based programming languages like SCRATCH have become increasingly popular as introductory languages for novices. These languages are intended to be used with a “tinkering” approach which allows learners and teachers to quickly assemble working programs and games, but this often leads to low code quality. Such code can be hard to comprehend, changing it is error-prone, and learners may struggle and lose interest. The general solution to improve code quality is to refactor the code. However, SCRATCH lacks many of the common abstraction mechanisms used when refactoring programs written in higher programming languages. In order to improve SCRATCH code, we therefore propose a set of atomic code transformations to optimise readability by (1) rewriting control structures and (2) simplifying scripts using the inherently concurrent nature of SCRATCH programs. By automating these transformations it is possible to explore the space of possible variations of SCRATCH programs. In this paper, we describe a multi-objective search-based approach that determines sequences of code transformations which improve the readability of a given SCRATCH program and therefore form refactorings. Evaluation on a random sample of 1000 SCRATCH programs demonstrates that the generated refactorings reduce complexity and entropy in 70.4% of the cases, and 354 projects are improved in at least one metric without making any other metric worse. The refactored programs can help both novices and their teachers to improve their code. Felix Adler, Gordon Fraser 0001, Eva Gründinger, Nina Körber, Simon Labrenz, Jonas Lerchenberger, Stephan Lukasczyk, Sebastian Schweikl |
SCAM | 2 |
| 2021 | An Empirical Study to Determine if Mutants Can Effectively Simulate Students' Programming Mistakes to Increase Tutors' Confidence in AutogradingabstractAutomated grading often requires automated test suites to identify students' faults. However, tests may not detect some faults, limiting feedback, and providing inaccurate grades. This issue can be mitigated by first ensuring that tests can detect faults. Mutation analysis is a technique that generates artificial faulty variants of a program for this purpose, called mutants. Mutants that are not detected by tests reveal their inadequacies, providing knowledge on how they can be improved. By using mutants to improve test suites, tutors can gain the confidence that: a) generated grades will not be biased by unidentified faults, and b) students will receive appropriate feedback for their mistakes. Existing work has shown that mutants are suitable substitutes for faults in real world software, but no work has shown that this holds for students' faults. In this paper, we investigate whether mutants are capable of replicating mistakes made by students. We conducted a quantitative study on 197 Java classes written by students across three introductory programming assignments, and mutants generated from the assignments' model solutions. We found that generated mutants capture the observed faulty behaviour of students' solutions. We also found that mutants better assess test adequacy than code coverage in some cases. Our results indicate that tutors can use mutants to identify and remedy deficiencies in grading test suites. Ben Clegg 0002, Phil McMinn, Gordon Fraser 0001 |
SIGCSE | 3 |
| 2021 | Graph-based seed object synthesis for search-based unit testingabstractSearch-based software testing (SBST) generates tests using search algorithms guided by measurements gauging how far a test case is away from exercising a coverage goal. The effectiveness of SBST largely depends on the continuity and monotonicity of the fitness landscape decided by these measurements and the search operators. Unfortunately, the fitness landscape is challenging when the function under test takes object inputs, as classical measurement hardly provide guidance for constructing legitimate object inputs. To overcome this problem, we propose test seeds, i.e., test code skeletons of legitimate objects which enable the use of classical measurements. Given a target branch in a function under test, we first statically analyze the function to build an object construction graph that captures the relation between the operands of the target method and the states of their relevant object inputs. Based on the graph, we synthesize test template code where each "slot" is a mutation point for the search algorithm. This approach can be seamlessly integrated with existing SBST algorithms, and we implemented EvoObj on top of EvoSuite. Our experiments show that EvoObj outperforms EvoSuite with statistical significance on 2750 methods over 103 open source Java projects using state-of-the-art SBST algorithms. Yun Lin 0001, You Sheng Ong, Jun Sun 0001, Gordon Fraser 0001, Jin Song Dong 0001 |
ESEC/SIGSOFT FSE | 4 |
| 2020 | The Influence of Test Suite Properties on Automated Grading of Programming ExercisesabstractAutomated grading allows for the scalable assessment of large programming courses, often using test cases to determine the correctness of students' programs. However, test suites can vary in multiple ways, such as quality, size, and coverage. In this paper, we investigate how much test suites with varying properties can impact generated grades, and how these properties cause this impact. We conduct a study on artificial faulty programs that simulate students' programming mistakes and test suites generated from manually written tests. We find that these test suites generate greatly varying grades, with the standard deviation of grades for each fault typically representing ~84% of the grades not apportioned to the fault. We show that different properties of test suites can influence the grades that they produce, with coverage typically making the greatest effect, and mutation score and the potentially redundant repeated coverage of lines also having a significant impact. We offer suggestions based on our findings to assist tutors with building grading test suites that assess students' code in a fair and consistent manner. These suggestions include ensuring that test suites have 100% coverage, avoiding unnecessarily recovering lines, and checking test suites using real or artificial faults. Ben Clegg 0002, Phil McMinn, Gordon Fraser 0001 |
CSEE&T | 3 |
| 2020 | Tutorial on a Gamification Toolset for Improving Engagement of Students in Software Engineering CoursesabstractFew if any would dispute that educating software engineering is a challenging endeavour. Although programming and creating new artefacts can motivate the creativity of students. Other software engineering topics (like e.g. requirement specifications and testing) are not considered very exciting by students. However, these topics are important to develop quality software and insufficient knowledge of students - Europe's future software engineers - in the long run contributes to failing software. The EU Erasmus+ project IMPRESS was set to explore the use of gamification in educating software engineering at the university level. The objective has been to develop a toolset that can help to improve students' engagement, and hence their appreciation, for the taught subjects like software testing and specifications. The proposed tutorial will guide participants through the set of tools developed by the project and introduce how they can use them to improve students' engagement. Tanja E. J. Vos, Gordon Fraser 0001, Iván Martínez-Ortiz, Rui Prada, António Manuel Ferreira Rito da Silva, I. S. W. B. Prasetya |
CSEE&T | 2 |
| 2020 | Causes and effects of fitness landscapes in unit test generationabstractSearch-based unit test generation applies evolutionary search to maximize code coverage. Although the performance of this approach is often good, sometimes it is not, and how the fitness landscape affects this performance is poorly understood. This paper presents a thorough analysis of 331 Java classes by (i) characterizing their fitness landscape using six established fitness landscape measures, (ii) analyzing the impact of these fitness landscape measures on the search, and (iii) investigating the underlying properties of the source code influencing these measures. Our results reveal that classical indicators for rugged fitness landscapes suggest well searchable problems in the case of unit test generation, but the fitness landscape for most problem instances is dominated by detrimental plateaus. A closer look at the underlying source code suggests that these plateaus are frequently caused by code in private methods, methods throwing exceptions, and boolean flags. This suggests that inter-procedural distance metrics and testability transformations could improve search-based test generation. Nasser M. Albunian, Gordon Fraser 0001, Dirk Sudholt |
GECCO | 2 |
| 2020 | Revisiting Test Smells in Automatically Generated Tests: Limitations, Pitfalls, and OpportunitiesabstractTest smells attempt to capture design issues in test code that reduce their maintainability. Previous work found such smells to be highly common in automatically generated test-cases, but based this result on specific static detection rules; although these are based on the original definition of "test smells", a recent empirical study showed that developers perceive these as overly strict and non-representative of the maintainability and quality of test suites. This leads us to investigate how effective such test smell detection tools are on automatically generated test suites. In this paper, we build a dataset of 2,340 test cases automatically generated by EVOSUITE for 100 Java classes. We performed a multi-stage, cross-validated manual analysis to identify six types of test smells and label their instances. We benchmark the performance of two test smell detection tools: one widely used in prior work, and one recently introduced with the express goal to match developer perceptions of test smells. Our results show that these test smell detection strategies poorly characterized the issues in automatically generated test suites; the older tool's detection strategies, especially, misclassified over 70% of test smells, both missing real instances (false negatives) and marking many smell-free tests as smelly (false positives). We identify common patterns in these tests that can be used to improve the tools, refine and update the definition of certain test smells, and highlight as of yet uncharacterized issues. Our findings suggest the need for (i) more appropriate metrics to match development practice; and (ii) more accurate detection strategies, to be evaluated primarily in industrial contexts. Annibale Panichella, Sebastiano Panichella, Gordon Fraser 0001, Anand Ashok Sawant, Vincent J. Hellendoorn |
ICSME | 3 |
| 2020 | Recovering fitness gradients for interprocedural Boolean flags in search-based testingabstractIn Search-based Software Testing (SBST), test generation is guided by fitness functions that estimate how close a test case is to reach an uncovered test goal (e.g., branch). A popular fitness function estimates how close conditional statements are to evaluating to true or false, i.e., the branch distance. However, when conditions read Boolean variables (e.g., if(x && y)), the branch distance provides no gradient for the search, since a Boolean can either be true or false. This flag problem can be addressed by transforming individual procedures such that Boolean flags are replaced with numeric comparisons that provide better guidance for the search. Unfortunately, defining a semantics-preserving transformation that is applicable in an interprocedural case, where Boolean flags are passed around as parameters and return values, is a daunting task. Thus, it is not yet supported by modern test generators. Yun Lin 0001, Jun Sun 0001, Gordon Fraser 0001, Ziheng Xiu, Ting Liu 0002, Jin Song Dong 0001 |
ISSTA | 3 |
| 2020 | Common Bugs in Scratch ProgramsabstractBugs in SCRATCH programs can spoil the fun and inhibit learning success. Many common bugs are the result of recurring patterns of bad code. In this paper we present a collection of common code patterns that typically hint at bugs in SCRATCH programs, and the LitterBox tool which can automatically detect them. We empirically evaluate how frequently these patterns occur, and how severe their consequences usually are. While fixing bugs inevitably is part of learning, the possibility to identify the bugs automatically provides the potential to support learners. Christoph Frädrich, Florian Obermüller, Nina Körber, Ute Heuer, Gordon Fraser 0001 |
ITiCSE | 5 |
| 2020 | Revisiting the Relationship Between Fault Detection, Test Adequacy Criteria, and Test Set SizeabstractThe research community has long recognized a complex interrelationship between fault detection, test adequacy criteria, and test set size. However, there is substantial confusion about whether and how to experimentally control for test set size when assessing how well an adequacy criterion is correlated with fault detection and when comparing test adequacy criteria. Resolving the confusion, this paper makes the following contributions: (1) A review of contradictory analyses of the relationships between fault detection, test adequacy criteria, and test set size. Specifically, this paper addresses the supposed contradiction of prior work and explains why test set size is neither a confounding variable, as previously suggested, nor an independent variable that should be experimentally manipulated. (2) An explication and discussion of the experimental designs of prior work, together with a discussion of conceptual and statistical problems, as well as specific guidelines for future work. (3) A methodology for comparing test adequacy criteria on an equal basis, which accounts for test set size without directly manipulating it through unrealistic stratification. (4) An empirical evaluation that compares the effectiveness of coverage-based testing, mutation-based testing, and random testing. Additionally, this paper proposes probabilistic coupling, a methodology for assessing the representativeness of a set of test goals for a given fault and for approximating the fault-detection probability of adequate test sets. Yiqun Chen 0001, Rahul Gopinath, Anita Tadakamalla, Michael D. Ernst, Reid Holmes, Gordon Fraser 0001, Paul Ammann, René Just |
ASE | 6 |
| 2020 | Verified from Scratch: Program Analysis for Learners' ProgramsabstractBlock-based programming languages like Scratch support learners by providing high-level constructs that hide details and by preventing syntactically incorrect programs. Questions nevertheless frequently arise: Is this program satisfying the given task? Why is my program not working? To support learners and educators, automated program analysis is needed for answering such questions. While adapting existing analyses to process blocks instead of textual statements is straightforward, the domain of programs controlled by block-based languages like Scratch is very different from traditional programs: In Scratch multiple actors, represented as highly concurrent programs, interact on a graphical stage, controlled by user inputs, and while the block-based program statements look playful, they hide complex mathematical operations that determine visual aspects and movement. Analyzing such programs is further hampered by the absence of clearly defined semantics, often resulting from ad-hoc decisions made by the implementers of the programming environment. To enable program analysis, we define the semantics of Scratch using an intermediate language. Based on this intermediate language, we implement the Bastet program analysis framework for Scratch programs, using concepts from abstract interpretation and software model checking. Like Scratch, Bastet is based on Web technologies, written in TypeScript, and can be executed using NodeJS or even directly in a browser. Evaluation on 279 programs written by children suggests that Bastet offers a practical solution for analysis of Scratch programs, thus enabling applications such as automated hint generation, automated evaluation of learner progress, or automated grading. Andreas Stahlbauer, Christoph Frädrich, Gordon Fraser 0001 |
ASE | 3 |
| 2020 | Measuring and Maintaining Population Diversity in Search-Based Unit Test Generation
Nasser M. Albunian, Gordon Fraser 0001, Dirk Sudholt |
SSBSE | 2 |
| 2020 | Search-Based Testing for Scratch Programs
Adina Deiner, Christoph Frädrich, Gordon Fraser 0001, Sophia Geserer, Niklas Zantner |
SSBSE | 3 |
| 2020 | Automated Unit Test Generation for PythonabstractAutomated unit test generation is an established research field, and mature test generation tools exist for statically typed programming languages such as Java. It is, however, substantially more difficult to automatically generate supportive tests for dynamically typed programming languages such as Python, due to the lack of type information and the dynamic nature of the language. In this paper, we describe a foray into the problem of unit test generation for dynamically typed languages. We introduce Pynguin, an automated unit test generation framework for Python. Using Pynguin, we aim to empirically shed light on two central questions: (1) Do well-established search-based test generation methods, previously evaluated only on statically typed languages, generalise to dynamically typed languages? (2) What is the influence of incomplete type information and dynamic typing on the problem of automated test generation? Our experiments confirm that evolutionary algorithms can outperform random test generation also in the context of Python, and can even alleviate the problem of absent type information to some degree. However, our results demonstrate that dynamic typing nevertheless poses a fundamental issue for test generation, suggesting future work on integrating type inference. Stephan Lukasczyk, Florian Kroiß, Gordon Fraser 0001 |
SSBSE | 3 |
| 2019 | Parallel Many-Objective Search for Unit TestsabstractMeta-heuristic search algorithms such as genetic algorithms have been applied successfully to generate unit tests, but typically take long to produce reasonable results, achieve sub-optimal code coverage, and have large variance due to their stochastic nature. Parallel genetic algorithms have been shown to be an effective improvement over sequential algorithms in many domains, but have seen little exploration in the context of unit test generation to date. In this paper, we describe a parallelised version of the many-objective sorting algorithm (MOSA) for test generation. Through the use of island models, where individuals can migrate between independently evolving populations, this algorithm not only reduces the necessary search time, but produces overall better results. Experiments with an implementation of parallel MOSA on the EvoSuite test generation tool using a large corpus of complex open source Java classes confirm that the parallelised MOSA algorithm achieves on average 84% code coverage, compared to 79% achieved by a standard sequential version. Verena Bader, José Campos 0001, Gordon Fraser 0001 |
ICST | 3 |
| 2019 | An Empirical Study on the Use of Defect Prediction for Test Case PrioritizationabstractTest case prioritization has been extensively re-searched as a means for reducing the time taken to discover regressions in software. While many different strategies have been developed and evaluated, prior experiments have shown them to not be effective at prioritizing test suites to find real faults. This paper presents a test case prioritization strategy based on defect prediction, a technique that analyzes code features - such as the number of revisions and authors - to estimate the likelihood that any given Java class will contain a bug. Intuitively, if defect prediction can accurately predict the class that is most likely to be buggy, a tool can prioritize tests to rapidly detect the defects in that class. We investigated how to configure a defect prediction tool, called Schwa, to maximize the likelihood of an accurate prediction, surfacing the link between perfect defect prediction and test case prioritization effectiveness. Using 6 real-world Java programs containing 395 real faults, we conducted an empirical evaluation comparing this paper's strategy, called G-clef, against eight existing test case prioritization strategies. The experiments reveal that using defect prediction to prioritize test cases reduces the number of test cases required to find a fault by on average 9.48% when compared with existing coverage-based strategies, and 10.4% when compared with existing history-based strategies. David Paterson, José Campos 0001, Rui Abreu 0001, Gregory M. Kapfhammer, Gordon Fraser 0001, Phil McMinn |
ICST | 5 |
| 2019 | Automatically testing self-driving cars with search-based procedural content generationabstractSelf-driving cars rely on software which needs to be thoroughly tested. Testing self-driving car software in real traffic is not only expensive but also dangerous, and has already caused fatalities. Virtual tests, in which self-driving car software is tested in computer simulations, offer a more efficient and safer alternative compared to naturalistic field operational tests. However, creating suitable test scenarios is laborious and difficult. In this paper we combine procedural content generation, a technique commonly employed in modern video games, and search-based testing, a testing technique proven to be effective in many domains, in order to automatically create challenging virtual scenarios for testing self-driving car soft- ware. Our AsFault prototype implements this approach to generate virtual roads for testing lane keeping, one of the defining features of autonomous driving. Evaluation on two different self-driving car software systems demonstrates that AsFault can generate effective virtual road networks that succeed in revealing software failures, which manifest as cars departing their lane. Compared to random testing AsFault was not only more efficient, but also caused up to twice as many lane departures. Alessio Gambi, Marc Müller, Gordon Fraser 0001 |
ISSTA | 3 |
| 2019 | Improving random GUI testing with image-based widget detectionabstractGraphical User Interfaces (GUIs) are amongst the most common user interfaces, enabling interactions with applications through mouse movements and key presses. Tools for automated testing of programs through their GUI exist, however they usually rely on operating system or framework specific knowledge to interact with an application. Due to frequent operating system updates, which can remove required information, and a large variety of different GUI frameworks using unique underlying data structures, such tools rapidly become obsolete, Consequently, for an automated GUI test generation tool, supporting many frameworks and operating systems is impractical. We propose a technique for improving GUI testing by automatically identifying GUI widgets in screen shots using machine learning techniques. As training data, we generate randomized GUIs to automatically extract widget information. The resulting model provides guidance to GUI testing tools in environments not currently supported by deriving GUI widget information from screen shots only. In our experiments, we found that identifying GUI widgets in screen shots and using this information to guide random testing achieved a significantly higher branch coverage in 18 of 20 applications, with an average increase of 42.5% when compared to conventional random testing. Thomas D. White, Gordon Fraser 0001, Guy J. Brown |
ISSTA | 2 |
| 2019 | IMPRESS: Improving Engagement in Software Engineering Courses Through Gamification
Tanja E. J. Vos, I. S. W. B. Prasetya, Gordon Fraser 0001, Iván Martínez-Ortiz, Iván J. Pérez-Colado, Rui Prada, José Bernardo Rocha, António Manuel Ferreira Rito da Silva |
PROFES | 3 |
| 2019 | An Empirical Evaluation of Search Algorithms for App Testing
Leon Sell, Michael Auer, Christoph Frädrich, Michael Gruber, Philemon Werli, Gordon Fraser 0001 |
ICTSS | 6 |
| 2019 | Code Defenders: A Mutation Testing GameabstractSoftware testing is an essential skill for software developers, but it is challenging to get students engaged in this activity. The Code Defenders game aims to address this problem by letting students compete over code under test by either introducing faults ("attacking") or by writing tests ("defending") to reveal these faults. We have empirically established that the game is engaging and players write better tests than outside the game scenario, and we have successfully integrated Code Defenders as a semester-long activity of an undergraduate and graduate level university course on software testing. This demonstration provides an introduction to Code Defenders from a student point of view (How to play the game?) as well as from a teacher point of view (How to set up games for my students, and how to integrate the game into my course?) A laptop is recommended to join in and try out the game. Gordon Fraser 0001 |
SIGCSE | 1 |
| 2019 | Gamifying a Software Testing Course with Code DefendersabstractSoftware testing is an essential skill for software developers, but it is challenging to get students engaged in this activity. The Code Defenders game addresses this problem by letting students compete over code under test by either introducing faults ("attacking") or by writing tests ("defending") to reveal these faults. In this paper, we describe how we integrated Code Defenders as a semester-long activity of an undergraduate and graduate level university course on software testing. We complemented the regular course sessions with weekly Code Defenders sessions, addressing challenges such as selecting suitable code to test, managing games, and assessing performance. Our experience and our data show that the integration of Code Defenders was well-received by students and led them to practice testing thoroughly. Positive learning effects are evident as student performance improved steadily throughout the semester. Gordon Fraser 0001, Alessio Gambi, Marvin Kreis, José Miguel Rojas |
SIGCSE | 1 |
| 2019 | Generating effective test cases for self-driving cars from police reportsabstractAutonomous driving carries the promise to drastically reduce the number of car accidents; however, recently reported fatal crashes involving self-driving cars show that such an important goal is not yet achieved. This calls for better testing of the software controlling self-driving cars, which is difficult because it requires producing challenging driving scenarios. To better test self-driving car soft- ware, we propose to specifically test car crash scenarios, which are critical par excellence. Since real car crashes are difficult to test in field operation, we recreate them as physically accurate simulations in an environment that can be used for testing self-driving car software. To cope with the scarcity of sensory data collected during real car crashes which does not enable a full reproduction, we extract the information to recreate real car crashes from the police reports which document them. Our extensive evaluation, consisting of a user study involving 34 participants and a quantitative analysis of the quality of the generated tests, shows that we can generate accurate simulations of car crashes in a matter of minutes. Compared to tests which implement non critical driving scenarios, our tests effectively stressed the test subject in different ways and exposed several shortcomings in its implementation. Alessio Gambi, Tri Huynh, Gordon Fraser 0001 |
ESEC/SIGSOFT FSE | 3 |
| 2019 | Code coverage at GoogleabstractCode coverage is a measure of the degree to which a test suite exercises a software system. Although coverage is well established in software engineering research, deployment in industry is often inhibited by the perceived usefulness and the computational costs of analyzing coverage at scale. At Google, coverage information is computed for one billion lines of code daily, for seven programming languages. A key aspect of making coverage information actionable is to apply it at the level of changesets and code review. This paper describes Google’s code coverage infrastructure and how the computed code coverage information is visualized and used. It also describes the challenges and solutions for adopting code coverage at scale. To study how code coverage is adopted and perceived by developers, this paper analyzes adoption rates, error rates, and average code coverage ratios over a five-year period, and it reports on 512 responses, received from surveying 3000 developers. Finally, this paper provides concrete suggestions for how to implement and use code coverage in an industrial setting. Marko Ivankovic, Goran Petrovic, René Just, Gordon Fraser 0001 |
ESEC/SIGSOFT FSE | 4 |
| 2019 | Testing scratch programs automaticallyabstractBlock-based programming environments like Scratch foster engagement with computer programming and are used by millions of young learners. Scratch allows learners to quickly create entertaining programs and games, while eliminating syntactical program errors that could interfere with progress. However, functional programming errors may still lead to incorrect programs, and learners and their teachers need to identify and understand these errors. This is currently an entirely manual process. In this paper, we introduce a formal testing framework that describes the problem of Scratch testing in detail. We instantiate this formal framework with the Whisker tool, which provides automated and property-based testing functionality for Scratch programs. Empirical evaluation on real student and teacher programs demonstrates that Whisker can successfully test Scratch programs, and automatically achieves an average of 95.25 % code coverage. Although well-known testing problems such as test flakiness also exist in the scenario of Scratch testing, we show that automated and property-based testing can accurately reproduce and replace the manually and laboriously produced grading efforts of a teacher, and opens up new possibilities to support learners of programming in their struggles. Andreas Stahlbauer, Marvin Kreis, Gordon Fraser 0001 |
ESEC/SIGSOFT FSE | 3 |
| 2018 | Automated Accessibility Testing of Mobile AppsabstractIt is important to make mobile apps accessible, so as not to exclude users with common disabilities such as blindness, low vision, or color blindness. Even when developers are aware of these accessibility needs, the lack of tool support makes the development and assessment of accessible apps challenging. Some accessibility properties can be checked statically, but user interface widgets are often created dynamically and are not amenable to static checking. Some accessibility checking frameworks analyze accessibility properties at runtime, but have to rely on existing thorough test suites. In this paper, we introduce the idea of using automated test generation to explore the accessibility of mobile apps. We present the MATE tool (Mobile Accessibility Testing), which automatically explores apps while applying different checks for accessibility issues related to visual impairment. For each issue, MATE generates a detailed report that supports the developer in fixing the issue. Experiments on a sample of 73 apps demonstrate that MATE detects more basic accessibility problems than static analysis, and many additional types of accessibility problems that cannot be detected statically at all. Comparison with existing accessibility testing frameworks demonstrates that the independence of an existing test suite leads to the identification of many more accessibility problems. Even when enabling Android's assistive features like contrast enhancement, MATE can still find many accessibility issues. Marcelo Medeiros Eler, José Miguel Rojas, Yan Ge 0002, Gordon Fraser 0001 |
ICST | 4 |
| 2018 | How Do Automatically Generated Unit Tests Influence Software Maintenance?abstractGenerating unit tests automatically saves time over writing tests manually and can lead to higher code coverage. However, automatically generated tests are usually not based on realistic scenarios, and are therefore generally considered to be less readable. This places a question mark over their practical value: Every time a test fails, a developer has to decide whether this failure has revealed a regression fault in the program under test, or whether the test itself needs to be updated. Does the fact that automatically generated tests are harder to read outweigh the time-savings gained by their automated generation, and render them more of a hindrance than a help for software maintenance? In order to answer this question, we performed an empirical study in which participants were presented with an automatically generated or manually written failing test, and were asked to identify and fix the cause of the failure. Our experiment and two replications resulted in a total of 150 data points based on 75 participants. Whilst maintenance activities take longer when working with automatically generated tests, we found developers to be equally effective with manually written and automatically generated tests. This has implications on how automated test generation is best used in practice, and it indicates a need for research into the generation of more realistic tests. Sina Shamshiri, José Miguel Rojas, Juan P. Galeotti, Neil Walkinshaw, Gordon Fraser 0001 |
ICST | 5 |
| 2018 | Search-based detection of deviation failures in the migration of legacy spreadsheet applicationsabstractMany legacy financial applications exist as a collection of formulas implemented in spreadsheets. Migration of these spreadsheets to a full-fledged system, written in a language such as Java, is an error- prone process. While small differences in the outputs of numerical calculations from the two systems are inevitable and tolerable, large discrepancies can have serious financial implications. Such discrepancies are likely due to faults in the migrated implementation, and are referred to as deviation failures. In this paper, we present a search-based technique that seeks to reveal deviation failures automatically. We evaluate different variants of this approach on two financial applications involving 40 formulas. These applications were produced by SEB Life & Pension Holding AB, who migrated their Microsoft Excel spreadsheets to a Java application. While traditional random and branch coverage-based test generation techniques were only able to detect approximately 25% and 32% of known faults in the migrated code respectively, our search-based approach detected up to 70% of faults with the same test generation budget. Without restriction of the search budget, up to 90% of known deviation failures were detected. In addition, three previously unknown faults were detected by this method that were confirmed by SEB experts. Mohammad Moein Almasi, Hadi Hemmati, Gordon Fraser 0001, Phil McMinn, Janis Benefelds |
ISSTA | 3 |
| 2018 | A Tutorial on Using and Extending the EvoSuite Search-Based Test GeneratorabstractEvoSuite is an automated unit test generation tool for Java. It takes as input a Java class under test, and produces JUnit tests optimised for code coverage, and enhanced with regression assertions, as output. This paper is a tutorial on how to use EvoSuite to generate tests, on how to build and extend EvoSuite, and how to use EvoSuite to run experiments on search-based testing. Gordon Fraser 0001 |
SSBSE | 1 |
| 2018 | An empirical evaluation of evolutionary algorithms for unit test suite generationabstractEvolutionary algorithms have been shown to be effective at generating unit test suites optimised for code coverage. While many specific aspects of these algorithms have been evaluated in detail (e.g., test length and different kinds of techniques aimed at improving performance, like seeding), the influence of the choice of evolutionary algorithm has to date seen less attention in the literature. Since it is theoretically impossible to design an algorithm that is the best on all possible problems, a common approach in software engineering problems is to first try the most common algorithm, a genetic algorithm, and only afterwards try to refine it or compare it with other algorithms to see if any of them is more suited for the addressed problem. The objective of this paper is to perform this analysis, in order to shed light on the influence of the search algorithm applied for unit test generation. We empirically evaluate thirteen different evolutionary algorithms and two random approaches on a selection of non-trivial open source classes. All algorithms are implemented in the EvoSuite test generation tool, which includes recent optimisations such as the use of an archive during the search and optimisation for multiple coverage criteria. Our study shows that the use of a test archive makes evolutionary algorithms clearly better than random testing, and it confirms that the DynaMOSA many-objective search algorithm is the most effective algorithm for unit test generation. Our results show that the choice of algorithm can have a substantial influence on the performance of whole test suite optimisation. Although we can make a recommendation on which algorithm to use in practice, no algorithm is clearly superior in all cases, suggesting future work on improved search algorithms for unit test generation. José Campos 0001, Yan Ge 0002, Nasser M. Albunian, Gordon Fraser 0001, Marcelo Medeiros Eler, Andrea Arcuri |
Inf. Softw. Technol. | 4 |
| 2018 | Special issue on automation of software testing: improving practical applicability
Christof J. Budnik, Gordon Fraser 0001, Francesca Lonetti, Hong Zhu 0002 |
Softw. Qual. J. | 2 |
| 2018 | Random or evolutionary search for object-oriented test suite generation?abstractSummary An important aim in software testing is constructing a test suite with high structural code coverage, that is, ensuring that most if not all of the code under test have been executed by the test cases comprising the test suite. Several search‐based techniques have proved successful at automatically generating tests that achieve high coverage. However, despite the well‐established arguments behind using evolutionary search algorithms (eg, genetic algorithms) in preference to random search, it remains an open question whether the benefits can actually be observed in practice when generating unit test suites for object‐oriented classes. In this paper, we report an empirical study on the effects of using evolutionary algorithms (including a genetic algorithm and chemical reaction optimization) to generate test suites, compared with generating test suites incrementally with random search. We apply the EVOSUITEunit test suite generator to 1000 classes randomly selected from the SF110 corpus of open‐source projects. Surprisingly, the results show that the difference is much smaller than one might expect: While evolutionary search covers more branches of the type where standard fitness functions provide guidance, we observed that, in practice, the vast majority of branches do not provide any guidance to the search. These results suggest that, although evolutionary algorithms are more effective at covering complex branches, a random search may suffice to achieve high coverage of most object‐oriented classes. Sina Shamshiri, José Miguel Rojas, Luca Gazzola, Gordon Fraser 0001, Phil McMinn, Leonardo Mariani, Andrea Arcuri |
Softw. Test. Verification Reliab. | 4 |
| 2017 | Evaluating and improving fault localizationabstractMost fault localization techniques take as input a faulty program, and produce as output a ranked list of suspicious code locations at which the program may be defective. When researchers propose a new fault localization technique, they typically evaluate it on programs with known faults. The technique is scored based on where in its output list the defective code appears. This enables the comparison of multiple fault localization techniques to determine which one is better. Previous research has evaluated fault localization techniques using artificial faults, generated either by mutation tools or manually. In other words, previous research has determined which fault localization techniques are best at finding artificial faults. However, it is not known which fault localization techniques are best at finding real faults. It is not obvious that the answer is the same, given previous work showing that artificial faults have both similarities to and differences from real faults. We performed a replication study to evaluate 10 claims in the literature that compared fault localization techniques (from the spectrum-based and mutation-based families). We used 2995 artificial faults in 6 real-world programs. Our results support 7 of the previous claims as statistically significant, but only 3 as having non-negligible effect sizes. Then, we evaluated the same 10 claims, using 310 real faults from the 6 programs. Every previous result was refuted or was statistically and practically insignificant. Our experiments show that artificial faults are not useful for predicting which fault localization techniques perform best on real faults. In light of these results, we identified a design space that includes many previously-studied fault localization techniques as well as hundreds of new techniques. We experimentally determined which factors in the design space are most important, using an overall set of 395 real faults. Then, we extended this design space with new techniques. Several of our novel techniques outperform all existing techniques, notably in terms of ranking defective code in the top-5 or top-10 reports. Spencer Pearson, José Campos 0001, René Just, Gordon Fraser 0001, Rui Abreu 0001, Michael D. Ernst, Deric Pang, Benjamin Keller |
ICSE | 4 |
| 2017 | Code defenders: crowdsourcing effective tests and subtle mutants with a mutation testing gameabstractWriting good software tests is difficult and not every developer's favorite occupation. Mutation testing aims to help by seeding artificial faults (mutants) that good tests should identify, and test generation tools help by providing automatically generated tests. However, mutation tools tend to produce huge numbers of mutants, many of which are trivial, redundant, or semantically equivalent to the original program, automated test generation tools tend to produce tests that achieve good code coverage, but are otherwise weak and have no clear purpose. In this paper, we present an approach based on gamification and crowdsourcing to produce better software tests and mutants: The Code Defenders web-based game lets teams of players compete over a program, where attackers try to create subtle mutants, which the defenders try to counter by writing strong tests. Experiments in controlled and crowdsourced scenarios reveal that writing tests as part of the game is more enjoyable, and that playing Code Defenders results in stronger test suites and mutants than those produced by automated tools. José Miguel Rojas, Thomas D. White, Ben Clegg 0002, Gordon Fraser 0001 |
ICSE | 4 |
| 2017 | Private API Access and Functional Mocking in Automated Unit Test GenerationabstractNot all object oriented code is easily testable: Dependency objects might be difficult or even impossible to instantiate, and object-oriented encapsulation makes testing potentially simple code difficult if it cannot easily be accessed. When this happens, then developers can resort to mock objects that simulate the complex dependencies, or circumvent object-oriented encapsulation and access private APIs directly through the use of, for example, Java reflection. Can automated unit test generation benefit from these techniques as well? In this paper we investigate this question by extending the EvoSuite unit test generation tool with the ability to directly access private APIs and to create mock objects using the popular Mockito framework. However, care needs to be taken that this does not impact the usefulness of the generated tests: For example, a test accessing a private field could later fail if that field is renamed, even if that renaming is part of a semantics-preserving refactoring. Such a failure would not be revealing a true regression bug, but is a false positive, which wastes the developer's time for investigating and fixing the test. Our experiments on the SF110 and Defects4J benchmarks confirm the anticipated improvements in terms of code coverage and bug finding, but also confirm the existence of false positives. However, by ensuring the test generator only uses mocking and reflection if there is no other way to reach some part of the code, their number remains small. Andrea Arcuri, Gordon Fraser 0001, René Just |
ICST | 2 |
| 2017 | Uncertainty-Driven Black-Box Test Data GenerationabstractWe can never be certain that a software system is correct simply by testing it, but with every additional successful test we become less uncertain about its correctness. In absence of source code or elaborate specifications and models, tests are usually generated or chosen randomly. However, rather than randomly choosing tests, it would be preferable to choose those tests that decrease our uncertainty about correctness the most. In order to guide test generation, we apply what is referred to in Machine Learning as "Query Strategy Framework": We infer a behavioural model of the system under test and select those tests which the inferred model is "least certain" about. Running these tests on the system under test thus directly targets those parts about which tests so far have failed to inform the model. We provide an implementation that uses a genetic programming engine for model inference in order to enable an uncertainty sampling technique known as "query by committee", and evaluate it on eight subject systems from the Apache Commons Math framework and JodaTime. The results indicate that test generation using uncertainty sampling outperforms conventional and Adaptive Random Testing. Neil Walkinshaw, Gordon Fraser 0001 |
ICST | 2 |
| 2017 | Generating unit tests with descriptive names or: would you name your children thing1 and thing2?abstractThe name of a unit test helps developers to understand the purpose and scenario of the test, and test names support developers when navigating amongst sets of unit tests. When unit tests are generated automatically, however, they tend to be given non-descriptive names such as “test0”, which provide none of the benefits a descriptive name can give a test. The underlying challenge is that automatically generated tests typically do not represent real scenarios and have no clear purpose other than covering code, which makes naming them di cult. In this paper, we present an automated approach which generates descriptive names for automatically generated unit tests by summarizing API-level coverage goals. The tests are optimized to be short, descriptive of the test, have a clear relation to the covered code under test, and allow developers to uniquely distinguish tests in a test suite. An empirical evaluation with 47 participants shows that developers agree with the synthesized names, and the synthesized names are equally descriptive as manually written names. Study participants were even more accurate and faster at matching code and tests with synthesized names compared to manually derived names. Ermira Daka, José Miguel Rojas, Gordon Fraser 0001 |
ISSTA | 3 |
| 2017 | An Empirical Evaluation of Evolutionary Algorithms for Test Suite Generation
José Campos 0001, Yan Ge 0002, Gordon Fraser 0001, Marcelo Medeiros Eler, Andrea Arcuri |
SSBSE | 3 |
| 2017 | A detailed investigation of the effectiveness of whole test suite generationabstractA common application of search-based software testing is to generate test cases for all goals defined by a coverage criterion (e.g., lines, branches, mutants). Rather than generating one test case at a time for each of these goals individually, whole test suite generation optimizes entire test suites towards satisfying all goals at the same time. There is evidence that the overall coverage achieved with this approach is superior to that of targeting individual coverage goals. Nevertheless, there remains some uncertainty on (a) whether the results generalize beyond branch coverage, (b) whether the whole test suite approach might be inferior to a more focused search for some particular coverage goals, and (c) whether generating whole test suites could be optimized by only targeting coverage goals not already covered. In this paper, we perform an in-depth analysis to study these questions. An empirical study on 100 Java classes using three different coverage criteria reveals that indeed there are some testing goals that are only covered by the traditional approach, although their number is only very small in comparison with those which are exclusively covered by the whole test suite approach. We find that keeping an archive of already covered goals along with the tests covering them and focusing the search on uncovered goals overcomes this small drawback on larger classes, leading to an improved overall effectiveness of whole test suite generation. José Miguel Rojas, Mattia Vivanti, Andrea Arcuri, Gordon Fraser 0001 |
Empir. Softw. Eng. | 4 |
| 2017 | Editorial for the special issue of STVR on the 8th IEEE International Conference on Software Testing, Verification, and Validation (ICST 2015)abstractThe 8th International Conference on Software Testing, Verification, and Validation (ICST 2015) was held on April 13 to 18, 2015, in Graz, Austria. The aim of the ICST conference is to bring together researchers and practitioners who study the theory, techniques, technologies, and applications that concern all aspects of software testing, verification, and validation of software systems. The ICST 2015 program chairs, Gordon Fraser and Darko Marinov, based on the recommendation of the program committee, selected 32 research papers for inclusion in the proceedings from among 132 submissions. All papers were refereed by at least three program committee members. Of the 32 papers accepted, we selected six papers for consideration for this special issue of STVR. These papers were extended from their conference version by the authors and were reviewed according to the STVR reviewing process. We thank all the ICST and STVR reviewers for their hard work. Five papers successfully completed the review process and are contained in this special issue. The rest of this editorial provides a brief overview of these five papers. The first paper—"QuickChecking Static Analysis Properties" by Jan Midtgaard and Anders Møller—presents an approach for testing static analysis tools. The approach is based on "quickchecking", ie, writing generators to randomly generate test inputs and automatically checking properties of test outputs. The generators focus on key parts of static analyses, including lattices and transfer functions. The approach is evaluated by quickchecking a type analysis for the Lua programming language. The second paper—"Causal Inference Based Fault Localization for Numerical Software with NUMFL" by Zhuofu Bai, Gang Shu, and Andy Podgurski—presents a technique for localizing faults in numerical software. The technique combines causal and statistical analyses to characterize the effects of individual numerical expressions on output errors. The experiments compare the new technique with five prior techniques on parts of four Java numerical libraries. The results show that the new technique is more effective for fault localization. The third paper—"Detecting Display Energy Hotspots in Android Apps" by Mian Wan, Yuchen Jin, Ding Li, Jiaping Gui, Sonal Mahajan, and William G. J. Halfond—presents a technique to detect user interfaces of a mobile application whose energy consumption is suboptimal. Energy consumption is emerging in its importance, and displays can take a substantial portion of energy consumption. The technique uses display power modeling and automated display transformation techniques to detect energy hotspots and prioritize them for developers. The evaluation shows that the technique can predict display energy consumption highly accurately, and the average savings that could be realized by changing user interface was about 30%. The fourth paper—"Prioritizing Manual Test Cases in Rapid Release Environments" by Hadi Hemmati, Zhihan Fang, Mika V. Mäntylä, and Bram Adams—studies the problem of reducing the test execution costs by prioritizing tests. While a common assumption in test prioritization is the availability of code coverage information, this paper explores a rapid release scenario, where obtaining such information is not an option. Empirical results on different versions of Mozilla Firefox reveal that historical failure information can be used to effectively prioritize tests in such a scenario. The fifth paper—"Evaluating code-based test input generator tools" by Lajos Cseppentő and Zoltán Micskei—introduces a set of 363 small programs that each cover specific programming language features. A general framework provided as part of this work allows running different test input generation tools on these programs and collecting various metrics. Experimental results point out strengths and weaknesses of a number of existing tools. Importantly, the testing framework and code snippets are all publicly available, thus supporting reproducibility and further experiments with test generators. Gordon Fraser 0001, Darko Marinov |
Softw. Test. Verification Reliab. | 1 |
| 2016 | Unit Test Generation During Software Development: EvoSuite Plugins for Maven, IntelliJ and JenkinsabstractDifferent techniques to automatically generate unit tests for object oriented classes have been proposed, but how to integrate these tools into the daily activities of software development is a little investigated question. In this paper, we report on our experience in supporting industrial partners in introducing the EvoSuite automated JUnit test generation tool in their software development processes. The first step consisted of providing a plugin to the Apache Maven build infrastructure. The move from a research-oriented point-and-click tool to an automated step of the build process has implications on how developers interact with the tool and generated tests, and therefore, we produced a plugin for the popular IntelliJ Integrated Development Environment (IDE). As build automation is a core component of Continuous Integration (CI), we provide a further plugin to the Jenkins CI system, which allows developers to monitor the results of EvoSuite and integrate generated tests in their source tree. In this paper, we discuss the resulting architecture of the plugins, and the challenges arising when building such plugins. Although the plugins described are targeted for the EvoSuite tool, they can be adapted and their architecture can be reused for other test generation tools as well. Andrea Arcuri, José Campos 0001, Gordon Fraser 0001 |
ICST | 3 |
| 2016 | Java Enterprise Edition Support in Search-Based JUnit Test Generation
Andrea Arcuri, Gordon Fraser 0001 |
SSBSE | 2 |
| 2016 | Seeding strategies in search-based unit test generationabstractSummary Search‐based techniques have been applied successfully to the task of generating unit tests for object‐oriented software. However, as for any meta‐heuristic search, the efficiency heavily depends on many factors; seeding, which refers to the use of previous related knowledge to help solve the testing problem at hand, is one such factor that may strongly influence this efficiency. This paper investigates different seeding strategies for unit test generation, in particular seeding of numerical and string constants derived statically and dynamically, seeding of type information and seeding of previously generated tests. To understand the effects of these seeding strategies, the results of a large empirical analysis carried out on a large collection of open‐source projects from the SF110 corpus and the Apache Commons repository are reported. These experiments show with strong statistical confidence that, even for a testing tool already able to achieve high coverage, the use of appropriate seeding strategies can further improve performance. © 2016 The Authors. Software Testing, Verification and Reliability Published by John Wiley & Sons Ltd. José Miguel Rojas, Gordon Fraser 0001, Andrea Arcuri |
Softw. Test. Verification Reliab. | 2 |
| 2016 | A Survey on Metamorphic TestingabstractA test oracle determines whether a test execution reveals a fault, often by comparing the observed program output to the expected output. This is not always practical, for example when a program's input-output relation is complex and difficult to capture formally. Metamorphic testing provides an alternative, where correctness is not determined by checking an individual concrete output, but by applying a transformation to a test input and observing how the program output “morphs” into a different one as a result. Since the introduction of such metamorphic relations in 1998, many contributions on metamorphic testing have been made, and the technique has seen successful applications in a variety of domains, ranging from web services to computer graphics. This article provides a comprehensive survey on metamorphic testing: It summarises the research results and application areas, and analyses common practice in empirical studies of metamorphic testing as well as the main open challenges. Sergio Segura, Gordon Fraser 0001, Ana Belén Sánchez, Antonio Ruiz Cortés |
IEEE Trans. Software Eng. | 2 |
| 2015 | Random or Genetic Algorithm Search for Object-Oriented Test Suite Generation?abstractAchieving high structural coverage is an important aim in software testing. Several search-based techniques have proved successful at automatically generating tests that achieve high coverage. However, despite the well- established arguments behind using evolutionary search algorithms (e.g., genetic algorithms) in preference to random search, it remains an open question whether the benefits can actually be observed in practice when generating unit test suites for object-oriented classes. In this paper, we report an empirical study on the effects of using a genetic algorithm (GA) to generate test suites over generating test suites incrementally with random search, by applying the EvoSuite unit test suite generator to 1,000 classes randomly selected from the SF110 corpus of open source projects. Surprisingly, the results show little difference between the coverage achieved by test suites generated with evolutionary search compared to those generated using random search. A detailed analysis reveals that the genetic algorithm covers more branches of the type where standard fitness functions provide guidance. In practice, however, we observed that the vast majority of branches in the analyzed projects provide no such guidance. Sina Shamshiri, José Miguel Rojas, Gordon Fraser 0001, Phil McMinn |
GECCO | 3 |
| 2015 | 2nd International Workshop on Crowd Sourcing in Software Engineering (CSI-SE 2015)abstractCrowdsourcing is increasingly revolutionizing the ways in which software is engineered. Programmers increasingly crowdsource answering their questions through Q&A sites. Non-programmers may contribute human-intelligence to development projects, by, for example, usability testing software or even play games with a purpose to implicitly construct formal specifications. Crowdfunding helps to democratize decisions about what software to build. Software engineering researchers may even benefit from new opportunities to evaluate their work with real developers by recruiting developers from the crowd. CSI- SE will inform the software engineering community of current techniques and trends in crowdsourcing, discuss the application of crowdsourcing to software engineering to date, and identify new opportunities to apply crowdsourcing to solve software engineering problems. Gordon Fraser 0001, Thomas D. LaToza, Leonardo Mariani |
ICSE (2) | 1 |
| 2015 | Automated unit test generation during software development: a controlled experiment and think-aloud observationsabstractAutomated unit test generation tools can produce tests that are superior to manually written ones in terms of code coverage, but are these tests helpful to developers while they are writing code? A developer would first need to know when and how to apply such a tool, and would then need to understand the resulting tests in order to provide test oracles and to diagnose and fix any faults that the tests reveal. Considering all this, does automatically generating unit tests provide any benefit over simply writing unit tests manually? We empirically investigated the effects of using an automated unit test generation tool (EvoSuite) during development. A controlled experiment with 41 students shows that using EvoSuite leads to an average branch coverage increase of +13%, and 36% less time is spent on testing compared to writing unit tests manually. However, there is no clear effect on the quality of the implementations, as it depends on how the test generation tool and the generated tests are used. In-depth analysis, using five think-aloud observations with professional programmers, confirms the necessity to increase the usability of automated unit test generation tools, to integrate them better during software development, and to educate software developers on how to best use those tools. José Miguel Rojas, Gordon Fraser 0001, Andrea Arcuri |
ISSTA | 2 |
| 2015 | Do Automatically Generated Unit Tests Find Real Faults? An Empirical Study of Effectiveness and Challenges (T)abstractRather than tediously writing unit tests manually, tools can be used to generate them automatically - sometimes even resulting in higher code coverage than manual testing. But how good are these tests at actually finding faults? To answer this question, we applied three state-of-the-art unit test generation tools for Java (Randoop, EvoSuite, and Agitar) to the 357 real faults in the Defects4J dataset and investigated how well the generated test suites perform at detecting these faults. Although the automatically generated test suites detected 55.7% of the faults overall, only 19.9% of all the individual test suites detected a fault. By studying the effectiveness and problems of the individual tools and the tests they generate, we derive insights to support the development of automated unit test generators that achieve a higher fault detection rate. These insights include 1) improving the obtained code coverage so that faulty statements are executed in the first instance, 2) improving the propagation of faulty program states to an observable output, coupled with the generation of more sensitive assertions, and 3) improving the simulation of the execution environment to detect faults that are dependent on external factors such as date and time. Sina Shamshiri, René Just, José Miguel Rojas, Gordon Fraser 0001, Phil McMinn, Andrea Arcuri |
ASE | 4 |
| 2015 | Generating TCP/UDP network data for automated unit test generationabstractAlthough automated unit test generation techniques can in principle generate test suites that achieve high code coverage, in practice this is often inhibited by the dependence of the code under test on external resources. In particular, a common problem in modern programming languages is posed by code that involves networking (e.g., opening a TCP listening port). In order to generate tests for such code, we describe an approach where we mock (simulate) the networking interfaces of the Java standard library, such that a search-based test generator can treat the network as part of the test input space. This not only has the benefit that it overcomes many limitations of testing networking code (e.g., different tests binding to the same local ports, and deterministic resolution of hostnames and ephemeral ports), it also substantially increases code coverage. An evaluation on 23,886 classes from 110 open source projects, totalling more than 6.6 million lines of Java code, reveals that network access happens in 2,642 classes (11%). Our implementation of the proposed technique as part of the EVOSUITE testing tool addresses the networking code contained in 1,672 (63%) of these classes, and leads to an increase of the average line coverage from 29.1% to 50.8%. On a manual selection of 42 Java classes heavily depending on networking, line coverage with EVOSUITE more than doubled with the use of network mocking, increasing from 31.8% to 76.6%. Andrea Arcuri, Gordon Fraser 0001, Juan P. Galeotti |
ESEC/SIGSOFT FSE | 2 |
| 2015 | Modeling readability to improve unit testsabstractWriting good unit tests can be tedious and error prone, but even once they are written, the job is not done: Developers need to reason about unit tests throughout software development and evolution, in order to diagnose test failures, maintain the tests, and to understand code written by other developers. Unreadable tests are more difficult to maintain and lose some of their value to developers. To overcome this problem, we propose a domain-specific model of unit test readability based on human judgements, and use this model to augment automated unit test generation. The resulting approach can automatically generate test suites with both high coverage and also improved readability. In human studies users prefer our improved tests and are able to answer maintenance questions about them 14% more quickly at the same level of accuracy. Ermira Daka, José Campos 0001, Gordon Fraser 0001, Jonathan Dorn, Westley Weimer |
ESEC/SIGSOFT FSE | 3 |
| 2015 | Continuous Test Generation on Guava
José Campos 0001, Gordon Fraser 0001, Andrea Arcuri, Rui Abreu 0001 |
SSBSE | 2 |
| 2015 | Generating Readable Unit Tests for Guava
Ermira Daka, José Campos 0001, Jonathan Dorn, Gordon Fraser 0001, Westley Weimer |
SSBSE | 4 |
| 2015 | Parameter Control in Search-Based Generation of Unit Test Suites
David Paterson, Jonathan Turner, Thomas D. White, Gordon Fraser 0001 |
SSBSE | 4 |
| 2015 | Combining Multiple Coverage Criteria in Search-Based Unit Test Generation
José Miguel Rojas, José Campos 0001, Mattia Vivanti, Gordon Fraser 0001, Andrea Arcuri |
SSBSE | 4 |
| 2015 | 1600 faults in 100 projects: automatically finding faults while achieving high coverage with EvoSuite
Gordon Fraser 0001, Andrea Arcuri |
Empir. Softw. Eng. | 1 |
| 2015 | Achieving scalable mutation-based generation of whole test suites
Gordon Fraser 0001, Andrea Arcuri |
Empir. Softw. Eng. | 1 |
| 2015 | A Memetic Algorithm for whole test suite generationabstractThe generation of unit-level test cases for structural code coverage is a task well-suited to Genetic Algorithms. Method call sequences must be created that construct objects, put them into the right state and then execute uncovered code. However, the generation of primitive values, such as integers and doubles, characters that appear in strings, and arrays of primitive values, are not so straightforward. Often, small local changes are required to drive the value toward the one needed to execute some target structure. However, global searches like Genetic Algorithms tend to make larger changes that are not concentrated on any particular aspect of a test case. In this paper, we extend the Genetic Algorithm behind the EvoSuite test generation tool into a Memetic Algorithm, by equipping it with several local search operators. These operators are designed to efficiently optimize primitive values and other aspects of a test suite that allow the search for test cases to function more effectively. We evaluate our operators using a rigorous experimental methodology on over 12,000 Java classes, comprising open source classes of various different kinds, including numerical applications and text processors. Our study shows that increases in branch coverage of up to 53% are possible for an individual class in practice. Gordon Fraser 0001, Andrea Arcuri, Phil McMinn |
J. Syst. Softw. | 1 |
| 2015 | Assessing and generating test sets in terms of behavioural adequacyabstractSummary Identifying a finite test set that adequately captures the essential behaviour of a program such that all faults are identified is a well‐established problem. This is traditionally addressed with syntactic adequacy metrics (e.g. branch coverage), but these can be impractical and may be misleading even if they are satisfied. One intuitive notion of adequacy, which has been discussed in theoretical terms over the past three decades, is the idea ofbehavioural coverage: If it is possible to infer an accurate model of a system from its test executions, then the test set can be deemed to be adequate. Despite its intuitive basis, it has remained almost entirely in the theoretical domain because inferred models have been expected to be exact (generally an infeasible task) and have not allowed for any pragmatic interim measures of adequacy to guide test set generation. This paper presents a practical approach to incorporate behavioural coverage. OurBESTESTapproach (1) enables the use of machine learning algorithms to augment standard syntactic testing approaches and (2) shows how search‐based testing techniques can be applied to generate test sets with respect to this criterion. An empirical study on a selection of Java units demonstrates that test sets with higher behavioural coverage significantly outperform current baseline test criteria in terms of detected faults. © 2015 The Authors.Software Testing, Verification and Reliabilitypublished by John Wiley & Sons, Ltd. Gordon Fraser 0001, Neil Walkinshaw |
Softw. Test. Verification Reliab. | 1 |
| 2015 | Does Automated Unit Test Generation Really Help Software Testers? A Controlled Empirical StudyabstractWork on automated test generation has produced several tools capable of generating test data which achieves high structural coverage over a program. In the absence of a specification, developers are expected to manually construct or verify the test oracle for each test input. Nevertheless, it is assumed that these generated tests ease the task of testing for the developer, as testing is reduced to checking the results of tests. While this assumption has persisted for decades, there has been no conclusive evidence to date confirming it. However, the limited adoption in industry indicates this assumption may not be correct, and calls into question the practical value of test generation tools. To investigate this issue, we performed two controlled experiments comparing a total of 97 subjects split between writing tests manually and writing tests with the aid of an automated unit test generation tool, E vo S uite . We found that, on one hand, tool support leads to clear improvements in commonly applied quality metrics such as code coverage (up to 300% increase). However, on the other hand, there was no measurable improvement in the number of bugs actually found by developers. Our results not only cast some doubt on how the research community evaluates test generation tools, but also point to improvements and future work necessary before automated test generation tools will be widely adopted by practitioners. Gordon Fraser 0001, Matthew Staats, Phil McMinn, Andrea Arcuri, Frank Padberg |
ACM Trans. Softw. Eng. Methodol. | 1 |
| 2015 | Inferring Loop Invariants by Mutation, Dynamic Analysis, and Static CheckingabstractVerifiers that can prove programs correct against their full functional specification require, for programs with loops, additional annotations in the form of loop invariants-properties that hold for every iteration of a loop. We show that significant loop invariant candidates can be generated by systematically mutating postconditions; then, dynamic checking (based on automatically generated tests) weeds out invalid candidates, and static checking selects provably valid ones. We present a framework that automatically applies these techniques to support a program prover, paving the way for fully automatic verification without manually written loop invariants: Applied to 28 methods (including 39 different loops) from various java.util classes (occasionally modified to avoid using Java features not fully supported by the static checker), our DYNAMATE prototype automatically discharged 97 percent of all proof obligations, resulting in automatic complete correctness proofs of 25 out of the 28 methods-outperforming several state-of-the-art tools for fully automatic verification. Juan P. Galeotti, Carlo A. Furia, Eva May, Gordon Fraser 0001, Andreas Zeller |
IEEE Trans. Software Eng. | 4 |
| 2014 | Automatic Testing of Natural User InterfacesabstractAutomated test generation can effectively explore programs through their programmer interfaces and traditional graphical user interfaces, but the recent advent of natural user interfaces (NUI) based on motion and gesture detection, for example the Microsoft Kinect, has outrun software testing research. This leaves a rapidly growing domain of software ranging from entertainment to medical applications without suitable test automation techniques. To address this issue, we propose a technique that automatically tests Kinect-based applications by synthesising realistic sequences of skeletal movement. The novel test cases are generated by a statistical model, which is trained on a corpus of common gestures. Evaluation on a gesture-controlled Kinect web browser application demonstrates that our approach achieves significantly higher code coverage than random test inputs. Chris J. Hunt, Guy J. Brown, Gordon Fraser 0001 |
ICST | 3 |
| 2014 | A Survey on Unit Testing Practices and ProblemsabstractUnit testing is a common practice where developers write test cases together with regular code. Automation frameworks such as JUnit for Java have popularised this approach, allowing frequent and automatic execution of unit test suites. Despite the appraisals of unit testing in practice, software engineering researchers see potential for improvement and investigate advanced techniques such as automated unit test generation. To align such research with the needs of practitioners, we conducted a survey amongst 225 software developers, covering different programming languages and 29 countries, using a global online marketing research platform. The survey responses confirm that unit testing is an important factor in software development, and suggest that there is indeed potential and need for research on automation of unit testing. The results help us to identify areas of importance on which further research will be necessary (e.g., Maintenance of unit tests), and also provide insights into the suitability of online marketing research platforms for software engineering surveys. Ermira Daka, Gordon Fraser 0001 |
ISSRE | 2 |
| 2014 | Extending a search-based test generator with adaptive dynamic symbolic executionabstractAutomatic unit test generation aims to support developers by alleviating the burden of test writing. Different techniques have been proposed over the years, each with distinct limitations. To overcome these limitations, we present an extension to the EvoSuite unit test generator that combines two of the most popular techniques for test case generation: Search-Based Software Testing (SBST) and Dynamic Symbolic Execution (DSE). A novel integration of DSE as a step of local improvement in a genetic algorithm results in an adaptive approach, such that the best test generation technique for the problem at hand is favoured, resulting in overall higher code coverage. Juan P. Galeotti, Gordon Fraser 0001, Andrea Arcuri |
ISSTA | 2 |
| 2014 | Efficient mutation analysis by propagating and partitioning infected execution statesabstractMutation analysis evaluates a testing technique by measur- ing how well it detects seeded faults (mutants). Mutation analysis is hampered by inherent scalability problems — a test suite is executed for each of a large number of mutants. Despite numerous optimizations presented in the literature, this scalability issue remains, and this is one of the reasons why mutation analysis is hardly used in practice. Whereas most previous optimizations attempted to stati- cally reduce the number of executions or their computational overhead, this paper exploits information available only at run time to further reduce the number of executions. First, state infection conditions can reveal — with a single test execution of the unmutated program — which mutants would lead to a different state, thus avoiding unnecessary test executions. Second, determining whether an infected execution state propagates can further reduce the number of executions. Mutants that are embedded in compound expressions may infect the state locally without affecting the outcome of the compound expression. Third, those mutants that do infect the state can be partitioned based on the resulting infected state — if two mutants lead to the same infected state, only one needs to be executed as the result of the other can be inferred. We have implemented these optimizations in the Major mu- tation framework and empirically evaluated them on 14 open source programs. The optimizations reduced the mutation analysis time by 40% on average. René Just, Michael D. Ernst, Gordon Fraser 0001 |
ISSTA | 3 |
| 2014 | Automated unit test generation for classes with environment dependenciesabstractAutomated test generation for object-oriented software typically consists of producing sequences of calls aiming at high code coverage. In practice, the success of this process may be inhibited when classes interact with their environment, such as the file system, network, user-interactions, etc. This leads to two major problems: First, code that depends on the environment can sometimes not be fully covered simply by generating sequences of calls to a class under test, for example when execution of a branch depends on the contents of a file. Second, even if code that is environment-dependent can be covered, the resulting tests may be unstable, i.e., they would pass when first generated, but then may fail when executed in a different environment. For example, tests on classes that make use of the system time may have failing assertions if the tests are executed at a different time than when they were generated. Andrea Arcuri, Gordon Fraser 0001, Juan P. Galeotti |
ASE | 2 |
| 2014 | Continuous test generation: enhancing continuous integration with automated test generationabstractIn object oriented software development, automated unit test generation tools typically target one class at a time. A class, however, is usually part of a software project consisting of more than one class, and these are subject to changes over time. This context of a class offers significant potential to improve test generation for individual classes. In this paper, we introduce Continuous Test Generation (CTG), which includes automated unit test generation during continuous integration (i.e., infrastructure that regularly builds and tests software projects). CTG offers several benefits: First, it answers the question of how much time to spend on each class in a project. Second, it helps to decide in which order to test them. Finally, it answers the question of which classes should be subjected to test generation in the first place. We have implemented CTG using the EvoSuite unit test generation tool, and performed experiments using eight of the most popular open source projects available on GitHub, ten randomly selected projects from the SF100 corpus, and five industrial projects. Our experiments demonstrate improvements of up to +58% for branch coverage and up to +69% for thrown undeclared exceptions, while reducing the time spent on test generation by up to +83%. José Campos 0001, Andrea Arcuri, Gordon Fraser 0001, Rui Abreu 0001 |
ASE | 3 |
| 2014 | Are mutants a valid substitute for real faults in software testing?abstractA good test suite is one that detects real faults. Because the set of faults in a program is usually unknowable, this definition is not useful to practitioners who are creating test suites, nor to researchers who are creating and evaluating tools that generate test suites. In place of real faults, testing research often uses mutants, which are artificial faults -- each one a simple syntactic variation -- that are systematically seeded throughout the program under test. Mutation analysis is appealing because large numbers of mutants can be automatically-generated and used to compensate for low quantities or the absence of known real faults. Unfortunately, there is little experimental evidence to support the use of mutants as a replacement for real faults. This paper investigates whether mutants are indeed a valid substitute for real faults, i.e., whether a test suite’s ability to detect mutants is correlated with its ability to detect real faults that developers have fixed. Unlike prior studies, these investigations also explicitly consider the conflating effects of code coverage on the mutant detection rate. Our experiments used 357 real faults in 5 open-source applications that comprise a total of 321,000 lines of code. Furthermore, our experiments used both developer-written and automatically-generated test suites. The results show a statistically significant correlation between mutant detection and real fault detection, independently of code coverage. The results also give concrete suggestions on how to improve mutation analysis and reveal some inherent limitations. René Just, Darioush Jalali, Laura Inozemtseva, Michael D. Ernst, Reid Holmes, Gordon Fraser 0001 |
SIGSOFT FSE | 6 |
| 2014 | On the Effectiveness of Whole Test Suite Generation
Andrea Arcuri, Gordon Fraser 0001 |
SSBSE | 2 |
| 2014 | Guest editorial: Search-based software engineering
Gordon Fraser 0001, Jerffeson Teixeira de Souza |
Empir. Softw. Eng. | 1 |
| 2014 | Search-based testing using constraint-based mutationabstractSUMMARY Many modern automated test generators are based on either metaheuristic search techniques or use constraint solvers. Both approaches have their advantages, but they also have specific drawbacks: Search‐based methods may get stuck in local optima and degrade when the search landscape offers no guidance; constraint‐based approaches, on the other hand, can only handle certain domains efficiently. This paper describes a method that integrates both techniques and delivers the best of both worlds. On a high‐level view, the proposed method uses a genetic algorithm to generate tests, but the twist is that during evolution, a constraint solver is used to ensure that mutated offspring efficiently explores different control flow. Experiments on 20 case study programmes show that on average the combination improves branch coverage by 28% over search‐based techniques while reducing the number of tests by 55%, and improves coverage by 13% over constraint‐based techniques while reducing the number of tests by 73%. Copyright © 2013 John Wiley & Sons, Ltd. Jan Malburg, Gordon Fraser 0001 |
Softw. Test. Verification Reliab. | 2 |
| 2014 | A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuiteabstractResearch on software testing produces many innovative automated techniques, but because software testing is by necessity incomplete and approximate, any new technique faces the challenge of an empirical assessment. In the past, we have demonstrated scientific advance in automated unit test generation with the E VO S UITE tool by evaluating it on manually selected open-source projects or examples that represent a particular problem addressed by the underlying technique. However, demonstrating scientific advance is not necessarily the same as demonstrating practical value; even if VO S UITE worked well on the software projects we selected for evaluation, it might not scale up to the complexity of real systems. Ideally, one would use large “real-world” software systems to minimize the threats to external validity when evaluating research tools. However, neither choosing such software systems nor applying research prototypes to them are trivial tasks. In this article we present the results of a large experiment in unit test generation using the VO S UITE tool on 100 randomly chosen open-source projects, the 10 most popular open-source projects according to the SourceForge Web site, seven industrial projects, and 11 automatically generated software projects. The study confirms that VO S UITE can achieve good levels of branch coverage (on average, 71% per class) in practice. However, the study also exemplifies how the choice of software systems for an empirical study can influence the results of the experiments, which can serve to inform researchers to make more conscious choices in the selection of software system subjects. Furthermore, our experiments demonstrate how practical limitations interfere with scientific advances, branch coverage on an unbiased sample is affected by predominant environmental dependencies. The surprisingly large effect of such practical engineering problems in unit testing will hopefully lead to a larger appreciation of work in this area, thus supporting transfer of knowledge from software testing research to practice. Gordon Fraser 0001, Andrea Arcuri |
ACM Trans. Softw. Eng. Methodol. | 1 |
| 2013 | Test suite generation with memetic algorithmsabstractGenetic Algorithms have been successfully applied to the generation of unit tests for classes, and are well suited to create complex objects through sequences of method calls. However, because the neighborhood in the search space for method sequences is huge, even supposedly simple optimizations on primitive variables (e.g., numbers and strings) can be ineffective or unsuccessful. To overcome this problem, we extend the global search applied in the EVOSUITE test generation tool with local search on the individual statements of method sequences. In contrast to previous work on local search, we also consider complex datatypes including strings and arrays. A rigorous experimental methodology has been applied to properly evaluate these new local search operators. In our experiments on a set of open source classes of different kinds (e.g., numerical applications and text processing), the resulting test data generation technique increased branch coverage by up to 32% on average over the normal Genetic Algorithm. Gordon Fraser 0001, Andrea Arcuri, Phil McMinn |
GECCO | 1 |
| 2013 | EvoSuite: On the Challenges of Test Case Generation in the Real WorldabstractTest case generation is an important but tedious task, such that researchers have devised many different prototypes that aim to automate it. As these are research prototypes, they are usually only evaluated on a few hand-selected case studies, such that despite great results there remains the question of usability in the “real world”. EVOSUITE is such a research prototype, which automatically generates unit test suites for classes written in the Java programming language. In our ongoing endeavour to achieve real-world usability, we recently passed the milestone success of applying EVOSUITE on hundred projects randomly selected from the SourceForge open source platform. This paper discusses the technical challenges that a testing tool like EVOSUITE needs to address when handling Java classes coming from real-world open source projects, and when producing JUnit test suites intended for real users. Gordon Fraser 0001, Andrea Arcuri |
ICST | 1 |
| 2013 | CrowdOracles: Can the Crowd Solve the Oracle Problem?abstractDespite the recent advances in test generation, fully automatic software testing remains a dream: Ultimately, any generated test input depends on a test oracle that determines correctness, and, except for generic properties such as “the program shall not crash”, such oracles require human input in one form or another. CrowdSourcing is a recently popular technique to automate computations that cannot be performed by machines, but only by humans. A problem is split into small chunks, that are then solved by a crowd of users on the Internet. In this paper we investigate whether it is possible to exploit CrowdSourcing to solve the oracle problem: We produce tasks asking users to evaluate CrowdOracles - assertions that reflect the current behavior of the program. If the crowd determines that an assertion does not match the behavior described in the code documentation, then a bug has been found. Our experiments demonstrate that CrowdOracles are a viable solution to automate the oracle problem, yet taming the crowd to get useful results is a difficult task. Fabrizio Pastore, Leonardo Mariani, Gordon Fraser 0001 |
ICST | 3 |
| 2013 | Reconstructing Core DumpsabstractWhen a software failure occurs in the field, it is often difficult to reproduce. Guided by a memory dump at the moment of failure (a “core dump”), our RECORE test case generator searches for a series of events that precisely reconstruct the failure from primitive data. Applied on seven non-trivial Java bugs, RECORE reconstructs the exact failure in five cases without any runtime overhead in production code. Jeremias Rößler, Andreas Zeller, Gordon Fraser 0001, Cristian Zamfir, George Candea |
ICST | 3 |
| 2013 | Generating Unit Tests for Concurrent ClassesabstractAs computers become more and more powerful, programs are increasingly split up into multiple threads to leverage the power of multi-core CPUs. However, writing correct multi-threaded code is a hard problem, as the programmer has to ensure that all access to shared data is coordinated. Existing automated testing tools for multi-threaded code mainly focus on re-executing existing test cases with different schedules. In this paper, we introduce a novel coverage criterion that enforces concurrent execution of combinations of shared memory access points with different schedules, and present an approach that automatically generates test cases for this coverage criterion. Our CONSUITE prototype demonstrates that this approach can reliably reproduce known concurrency errors, and evaluation on nine complex open source classes revealed three previously unknown data-races. Sebastian Steenbuck, Gordon Fraser 0001 |
ICST | 2 |
| 2013 | Improving search-based test suite generation with dynamic symbolic executionabstractSearch-based testing can automatically generate unit test suites for object oriented code, but may struggle to generate specific values necessary to cover difficult parts of the code. Dynamic symbolic execution (DSE) efficiently generates such specific values, but may struggle with complex datatypes, in particular those that require sequences of calls for construction. The solution to these problems lies in a hybrid approach that integrates the best of both worlds, but such an integration needs to adapt to the problem at hand to avoid that higher coverage in a few corner cases comes at the price of lower coverage in the general case. We have extended the Genetic Algorithm (GA) in the Evosuite unit test generator to integrate DSE in an adaptive approach where feedback from the search determines when a problem is suitable for DSE. In experiments on a set of difficult classes our adaptive hybrid approach achieved an increase in code coverage of up to 63% (11% on average); experiments on the SF100 corpus of roughly 9,000 open source classes confirm that the improvement is of practical value, and a comparison with a DSE tool on the Roops set of benchmark classes shows that the hybrid approach improves over both its constituent techniques, GA and DSE. Juan P. Galeotti, Gordon Fraser 0001, Andrea Arcuri |
ISSRE | 2 |
| 2013 | Search-based data-flow test generationabstractCoverage criteria based on data-flow have long been discussed in the literature, yet to date they are still of surprising little practical relevance. This is in part because 1) manually writing a unit test for a data-flow aspect is more challenging than writing a unit test that simply covers a branch or statement, 2) there is a lack of tools to support data-flow testing, and 3) there is a lack of empirical evidence on how well data-flow testing scales in practice. To overcome these problems, we present 1) a search-based technique to automatically generate unit tests for data-flow criteria, 2) an implementation of this technique in the Evosuite test generation tool, and 3) a large empirical study applying this tool to the SF100 corpus of 100 open source Java projects. On average, the number of coverage objectives is three times as high as for branch coverage. However, the level of coverage achieved by Evosuite is comparable to other criteria, and the increase in size is only 15%, leading to higher mutation scores. These results counter the common assumption that data-flow testing does not scale, and should help to re-establish data-flow testing as a viable alternative in practice. Mattia Vivanti, Andre Mis, Alessandra Gorla, Gordon Fraser 0001 |
ISSRE | 4 |
| 2013 | Does automated white-box test generation really help software testers?abstractAutomated test generation techniques can efficiently produce test data that systematically cover structural aspects of a program. In the absence of a specification, a common assumption is that these tests relieve a developer of most of the work, as the act of testing is reduced to checking the results of the tests. Although this assumption has persisted for decades, there has been no conclusive evidence to date confirming it. However, the fact that the approach has only seen a limited uptake in industry suggests the contrary, and calls into question its practical usefulness. To investigate this issue, we performed a controlled experiment comparing a total of 49 subjects split between writing tests manually and writing tests with the aid of an automated unit test generation tool, EvoSuite. We found that, on one hand, tool support leads to clear improvements in commonly applied quality metrics such as code coverage (up to 300% increase). However, on the other hand, there was no measurable improvement in the number of bugs actually found by developers. Our results not only cast some doubt on how the research community evaluates test generation tools, but also point to improvements and future work necessary before automated test generation tools will be widely adopted by practitioners. Gordon Fraser 0001, Matthew Staats, Phil McMinn, Andrea Arcuri, Frank Padberg |
ISSTA | 1 |
| 2013 | Entropy-based test generation for improved fault localizationabstractSpectrum-based Bayesian reasoning can effectively rank candidate fault locations based on passing/failing test cases, but the diagnostic quality highly depends on the size and diversity of the underlying test suite. As test suites in practice often do not exhibit the necessary properties, we present a technique to extend existing test suites with new test cases that optimize the diagnostic quality. We apply probability theory concepts to guide test case generation using entropy, such that the amount of uncertainty in the diagnostic ranking is minimized. Our ENTBUG prototype extends the search-based test generation tool EVOSUITE to use entropy in the fitness function of its underlying genetic algorithm, and we applied it to seven real faults. Empirical results show that our approach reduces the entropy of the diagnostic ranking by 49% on average (compared to using the original test suite), leading to a 91% average reduction of diagnosis candidates needed to inspect to find the true faulty one. José Campos 0001, Rui Abreu 0001, Gordon Fraser 0001, Marcelo d'Amorim |
ASE | 3 |
| 2013 | Parameter tuning or default values? An empirical investigation in search-based software engineering
Andrea Arcuri, Gordon Fraser 0001 |
Empir. Softw. Eng. | 2 |
| 2013 | Special section on Mutation testing (Mutation 2010)
Lydie du Bousquet, Jeremy S. Bradbury, Gordon Fraser 0001 |
Sci. Comput. Program. | 3 |
| 2013 | Guest editor's introduction to the special section on TAIC-PART 2010 - Testing: Academic and Industrial Conference-Practice and Research TechniquesabstractAlmost all organisations, irrespective of their size, rely on IT systems. Individuals are making increasing use of web applications for personal and social activities. Furthermore, as systems in general become more technologically advanced, an increasing proportion of the implementation is in software rather than in hardware. As a result, the quality and reliability of systems and the data they contain is increasingly dependent on the correctness, robustness and security of the associated software. The trend is clear: software is becoming pervasive and, as a result, software quality assurance, in the widest sense, is becoming a crucial everyday concern for all of us. Software testing is, by far, the most important means of assuring software quality. The Testing: Academic and Industrial Conference-Practice and Research Techniques 2010 (TAIC-PART 2010) was the fifth conference in a series of highly successful events. The conference brought together industrialists and academics to promote collaboration on problems in software testing. Among the wide range of topics in computer science and software engineering, software testing is an ideal candidate for academic and industrial collaboration because advances in research can have such wide-ranging and far-reaching implications for industry. Conversely, the advances in computing and communications technology and the growth of the associated software engineering activity are producing new research challenges at an increasing rate. TAIC-PART 2010 received forty paper submissions. After a rigorous reviewing process in which each paper was subjected to at least three independent reviews followed by programme committee discussion, 15 full papers and seven abstracts were accepted. One of these submissions was from industry, four were from collaborations between industry and academia and the remainder came from academia. The papers originated from 13 countries in Europe, North and South America, and Asia. The two best papers selected by the editors for publication in this special section are significantly extended versions of those TAIC-PART papers that received the strongest support from the referees. Each of the extended papers has been refereed by at least three expert reviewers and has undergone revisions as a result. They not only address important issues in security testing and fault localisation but also use novel and interesting techniques that could be deployed more widely. The first paper by Ben Kam and Thomas Dean, Linguistic security testing for text communication protocols considers the problem of protocol security testing. Protocols rely heavily on syntactic structures, and the authors adopt a syntax-based approach to security testing. The basic idea is to capture existing input to the application under test. The input is then parsed into an abstract syntax tree. Using a set of rewrite rules, the input is transformed to create test cases. A key contribution of their work is that they use a relatively simple context-free grammar together with XML mark-up rules to specify lexical, syntactic and context sensitive constraints. From this augmented grammar, they automatically generate a program that inserts XML tags into the appropriate parts of the captured test input. Multiple test generators can then use the tagged test input to produce different test cases, which are used to validate the security protocols of the software under test. In a case study, the authors tested an application that uses the iCalendar protocol for the communication of calendar information. Just over a thousand test cases were generated from a sample input; and upon execution of those test cases, an error was found, corresponding to a weakness in the iCalendar security protocol. Overall, the Syntax-based Security Testing framework is a relatively lightweight way of producing a protocol independent testing tool. New testing schemes can be accommodated by augmenting the grammar to add additional mark-up and creating the appropriate test case generators. The second paper by Mihai Nica, Simona Nica and Franz Wotawa, On the use of mutations and testing for debugging, is concerned with the problem of debugging but from a testing viewpoint. The main goal is to use testing as a way of localising faults within software. The underlying concept is to treat the statements in a program as a set of equations on the variables that appear in those statements. Each test case constrains the values of input and output variables. A failing test produces an inconsistency in the system of equations. The fault localisation process works by attempting to restore consistency. By removing individual statements until the system of equations is consistent, it is possible to identify candidate faulty statements, of which there are more than the actual number of faults. These candidates are subject to mutation, as a way of attempting to effect a repair. Candidates are retained if their repaired mutation causes an increase in consistency, whereas other candidates are discarded. Further test cases may be introduced to compare alternative surviving candidates and alternative repairs, which may need some input from the tester, or an oracle to help localise the fault. The approach is largely automated, but there are limitations as to the program constructs that can be represented as a set of equations. In addition, the constraint solver does not scale to large programs. In spite of these limitations, however, the approach is applied to a real world program with encouraging results. Both papers have a strong technical and also an empirical content. They capture the interplay of research and practice that is central to the aim of the conference and are fine examples of research in software testing. Finally, we would like to thank all the authors and reviewers for their effort and time. Furthermore, we would also like to thank the editors-in-chief of Software: Practice and Experience, Nigel Horspool and Andy Wellings, and the editorial staff for their support. Anthony J. H. Simons, Gordon Fraser 0001, Leonardo Bottaci |
Softw. Pract. Exp. | 2 |
| 2013 | Guest editor's introduction to the special section on tests and proofs
Gordon Fraser 0001, Angelo Gargantini |
Softw. Qual. J. | 1 |
| 2013 | Handling test length bloatabstractSUMMARY The length of test cases is a little investigated topic in search‐based test generation for object‐oriented software, where test cases are sequences of method calls. Although intuitively longer tests can achieve higher overall code coverage, there is always the threat of bloat – a complex phenomenon in evolutionary computation, where the length abnormally grows over time. In this paper, we show that bloat indeed also occurs in the context of test generation for object‐oriented software. We present different techniques to overcome the problem of length bloat, and evaluate all possible combinations of these techniques using different starting lengths for the search. Experiments on a set of difficult search targets, selected from several open source and industrial projects, show that controlling bloat with the appropriate techniques can significantly improve the search performance. Copyright © 2013 John Wiley & Sons, Ltd. Gordon Fraser 0001, Andrea Arcuri |
Softw. Test. Verification Reliab. | 1 |
| 2013 | Whole Test Suite GenerationabstractNot all bugs lead to program crashes, and not always is there a formal specification to check the correctness of a software test's outcome. A common scenario in software testing is therefore that test data are generated, and a tester manually adds test oracles. As this is a difficult task, it is important to produce small yet representative test sets, and this representativeness is typically measured using code coverage. There is, however, a fundamental problem with the common approach of targeting one coverage goal at a time: Coverage goals are not independent, not equally difficult, and sometimes infeasible—the result of test generation is therefore dependent on the order of coverage goals and how many of them are feasible. To overcome this problem, we propose a novel paradigm in which whole test suites are evolved with the aim of covering all coverage goals at the same time while keeping the total size as small as possible. This approach has several advantages, as for example, its effectiveness is not affected by the number of infeasible targets in the code. We have implemented this novel approach in the EvoSuite tool, and compared it to the common approach of addressing one goal at a time. Evaluated on open source libraries and an industrial case study for a total of 1,741 classes, we show that EvoSuite achieved up to 188 times the branch coverage of a traditional approach targeting single branches, with up to 62 percent smaller test suites. Gordon Fraser 0001, Andrea Arcuri |
IEEE Trans. Software Eng. | 1 |
| 2012 | Sound empirical evidence in software testingabstractSeveral promising techniques have been proposed to automate different tasks in software testing, such as test data generation for object-oriented software. However, reported studies in the literature only show the feasibility of the proposed techniques, because the choice of the employed artifacts in the case studies (e.g., software applications) is usually done in a non-systematic way. The chosen case study might be biased, and so it might not be a valid representative of the addressed type of software (e.g., internet applications and embedded systems). The common trend seems to be to accept this fact and get over it by simply discussing it in a threats to validity section. In this paper, we evaluate search-based software testing (in particular the EvoSuite tool) when applied to test data generation for open source projects. To achieve sound empirical results, we randomly selected 100 Java projects from SourceForge, which is the most popular open source repository (more than 300,000 projects with more than two million registered users). The resulting case study not only is very large (8,784 public classes for a total of 291,639 bytecode level branches), but more importantly it is statistically sound and representative for open source projects. Results show that while high coverage on commonly used types of classes is achievable, in practice environmental dependencies prohibit such high coverage, which clearly points out essential future research directions. To support this future research, our SF100 case study can serve as a much needed corpus of classes for test generation. Gordon Fraser 0001, Andrea Arcuri |
ICSE | 1 |
| 2012 | EXSYST: Search-based GUI testingabstractTest generation tools commonly aim to cover structural artefacts of software, such as either the source code or the user interface. However, focusing only on source code can lead to unrealistic or irrelevant test cases, while only exploring a user interface often misses much of the underlying program behavior. Our EXSYST prototype takes a new approach by exploring user interfaces while aiming to maximize code coverage, thus combining the best of both worlds. Experiments show that such an approach can achieve high code coverage matching and exceeding the code coverage of traditional unit-based test generators; yet, by construction every test case is realistic and relevant, and every detected failure can be shown to be caused by a real sequence of input events. Florian Gross, Gordon Fraser 0001, Andreas Zeller |
ICSE | 2 |
| 2012 | The Seed is Strong: Seeding Strategies in Search-Based Software TestingabstractSearch-based techniques have been shown useful for the task of generating tests, for example in the case of object-oriented software. But, as for any meta-heuristic search, the efficiency is heavily dependent on many different factors, seeding is one such factor that may strongly influence this efficiency. In this paper, we evaluate new and typical strategies to seed the initial population as well as to seed values introduced during the search when generating tests for object-oriented code. We report the results of a large empirical analysis carried out on 20 Java projects (for a total of 1,752 public classes). Our experiments show with strong statistical confidence that, even for a testing tool that is already able to achieve high coverage, the use of appropriate seeding strategies can further improve performance. Gordon Fraser 0001, Andrea Arcuri |
ICST | 1 |
| 2012 | Behaviourally Adequate Software TestingabstractIdentifying a finite test set that adequately captures the essential behaviour of a program such that all faults are identified is a well-established problem. Traditional adequacy metrics can be impractical, and may be misleading even if they are satisfied. One intuitive notion of adequacy, which has been discussed in theoretical terms over the past three decades, is the idea of behavioural coverage, if it is possible to infer an accurate model of a system from its test executions, then the test set must be adequate. Despite its intuitive basis, it has remained almost entirely in the theoretical domain because inferred models have been expected to be exact (generally an infeasible task), and have not allowed for any pragmatic interim measures of adequacy to guide test set generation. In this work we present a new test generation technique that is founded on behavioural adequacy, which combines a model evaluation framework from the domain of statistical learning theory with search-based white-box test generation strategies. Experiments with our BESTEST prototype indicate that such test sets not only come with a statistically valid measurement of adequacy, but also detect significantly more defects. Gordon Fraser 0001, Neil Walkinshaw |
ICST | 1 |
| 2012 | Semi-automatic Search-Based Test GenerationabstractSearch-based testing techniques can efficiently generate test data to achieve high code coverage. However, when the fitness function does not provide sufficient guidance, the search will only generate optimal results by chance. Yet, where the search algorithm struggles, a human tester with domain knowledge can often produce solutions easily. We therefore include the tester in the test generation process: When the search stagnates, the tester is given an opportunity to improve the current solution, and these improvements are fed back to the search. In particular, relevant problems occur often when generating tests for object-oriented languages, where test cases are sequences of method calls. Constructing complex objects through sequences of method calls is difficult, and often the traditional branch distance offers little guidance - yet for a human tester the same task is often trivial. In this paper, we present a semi-automatic test generation approach based on our search-based Evo Suite tool, and evaluate the usefulness and potential on a set of example classes. Yury Pavlov, Gordon Fraser 0001 |
ICST | 2 |
| 2012 | Search-based system testing: high coverage, no false alarmsabstractModern test case generation techniques can automatically achieve high code coverage. If they operate on the unit level, they run the risk of generating inputs infeasible in reality, which, when causing failures, are painful to identify and eliminate. Running a unit test generator on five open source Java programs, we found that all of the 181 reported failures were false failures—that is, indicating a problem in the generated test case rather than the program. By generating test cases at the GUI level, our EXSYST prototype can avoid such false alarms by construction. In our evaluation, it achieves higher coverage than search-based test generators at the unit level; yet, every failure can be shown to be caused by a real sequence of input events. Whenever a system interface is available, we recommend considering search-based system testing as an alternative to avoid false failures. Florian Gross, Gordon Fraser 0001, Andreas Zeller |
ISSTA | 2 |
| 2012 | Isolating failure causes through test case generationabstractManual debugging is driven by experiments—test runs that narrow down failure causes by systematically confirming or excluding individual factors. The BUGEX approach leverages test case generation to systematically isolate such causes from a single failing test run—causes such as properties of execution states or branches taken that correlate with the failure. Identifying these causes allows for deriving conclusions as: “The failure occurs whenever the daylight savings time starts at midnight local time.” In our evaluation, a prototype of BUGEX precisely pinpointed important failure explaining facts for six out of seven real-life bugs. Jeremias Rößler, Gordon Fraser 0001, Andreas Zeller, Alessandro Orso |
ISSTA | 2 |
| 2012 | Augmented dynamic symbolic executionabstractDynamic symbolic execution (DSE) can efficiently explore all simple paths through a program, reliably determining whether there are any program crashes or violations of assertions or code contracts. However, if such automated oracles do not exist, the traditional approach is to present the developer a small and representative set of tests in order to let him/her determine their correctness. Customer feedback on Microsoft's Pex tool revealed that users expect different values and also more values than those produced by Pex, which threatens the applicability of DSE in a scenario without automated oracles. Indeed, even though all paths might be covered by DSE, the resulting tests are usually not sensitive enough to make a good regression test suite. In this paper, we present augmented dynamic symbolic execution, which aims to produce representative test sets by augmenting path conditions with additional conditions that enforce target criteria such as boundary or mutation adequacy, or logical coverage criteria. Konrad Jamrozik, Gordon Fraser 0001, Nikolai Tillmann, Jonathan de Halleux |
ASE | 2 |
| 2012 | Guest Editorial for the Special Issue on Model-Based TestingabstractThere are two driving questions in software test automation: first, which tests to select out of a potentially infinite set of inputs, and second, whether the system under test exhibits an error when executing the chosen tests. Model-based testing (MBT) offers an answer to both of these questions. Models serve as a rich source of tests, and researchers have devised a wide range of techniques for selecting representative sets of tests. At the same time, the models encode the expected behaviour of the systems under test, and so the model answers the question of the expected output as well. The idea of MBT dates back to the 1970s, when people started using finite state machines for testing. Since then, an active international community has grown around this topic. Today, there are several workshops with years-long traditions (Workshop on Advances in Model-based Testing (A-MOST), Workshop on Model-based Testing (MBT), Workshop on Model-based Testing in Practice (MOTIP), Workshop on Model-Driven Engineering, Verification, and Validation (MoDeVVa), Workshop on Model-Based Verification and Validation (MVV), Model-Based Testing User Conference (MBTUC), etc.), papers on MBT appear at all major software engineering conferences and journals, there have been three Dagstuhl seminars dedicated to the topic, and several books on MBT have been published. Furthermore, reports of industrial success and companies that earn their living by providing MBT tools are clear indications that the topic has matured from a pure research topic into a successfully applied industrial technology. We received 29 submissions for this special issue. Reviewing followed the same process as for regular papers. Each paper was reviewed by at least three reviewers, and after a rigorous selection process requiring a total of 25 revisions and 100 reviews, nine papers remain for publication. These papers are spread across three special issues of STVR; this issue includes the first three papers, covering the foundations of MBT and offering an industrial perspective. The first paper, ‘A Taxonomy of Model-Based Testing Approaches’ by Mark Utting, Alexander Pretschner and Bruno Legeard, aims to organize a taxonomy describing the technologies and characteristics of the different MBT approaches that have been proposed over the years. This paper is based on a technical report from 2006, which is already very well known in the community and has 136 citations at the time of this writing, showing that it does an excellent job at capturing the essence of MBT. The second paper, ‘Obstacles and Opportunities in Deploying Model-Based GUI Testing of Mobile Software: A Survey’ by Marek Janicki, Mika Katara and Tuula Pääkkönen, investigates possible obstacles and opportunities towards wider deployment of MBT in industry. The paper is based on a survey conducted among engineers and managers involved in testing of mobile software that work in companies domiciled in Finland. The survey is based on a methodology called the TEMA toolset, which is introduced to the participants to give them an idea how MBT could work. Besides an evaluation of the TEMA toolset, the survey helps to identify the challenges in test automation, obstacles to MBT adoption, and identify metrics and reports that can convince managers to adopt MBT. The third paper, ‘Applying Formal Methods to PCEP: An Industrial Case Study from Modelling to Test Generation’ by Iksoon Hwang, Ana Cavalli, Mounir Lallali and Dominique Verchere, offers insights based on an industrial case study. In their study, the authors apply formal methods to model, verify and validate the Path Computation Element Communication Protocol. The protocol is modelled using the IF language, and test cases are produced using the automated test generation tool TestGen-IF. This article not only demonstrates the benefits of automated testing but also describes the authors’ experiences in identifying modelling errors—an aspect that should not be overlooked when applying MBT. All the contributions presented in this and the two upcoming special issues on MBT reveal the broad and dynamic MBT research community. This was possible through the combined efforts of all authors and reviewers, and we wish to thank them all for their time and energy. The following persons were the reviewers: Bernhard Aichernig, Andrea Arcuri, Phillips Aydal, Benoit Baudry, Fevzi Belli, Robert Binder, Paul Black, Gregor von Bochmann, Kirill Bogdanov, Sergiy Boroday, Fabrice Bouquet, Lydie du Bousquet, Harald Brandl, Mario Bravetti, Lionel Briand, José Campos, Ana Cavalli, Charles Colbourn, Mirko Conrad, Steve Counsell, Frederic Dadeau, Hyunsook Do, Juan Dueñas, Khaled El-Fakih, Phyllis Frankl, Angelo Gargantini, Sudipto Ghosh, Wolfgang Grieskamp, Mats Grindal, Florian Gross, Roland Groz, Qiang Guo, Atul Gupta, Mark Harman, Alan Hartman, Robert Hierons, Daniel Hoffman, Antti Huima, Florentin Ipate, Guy-Vincent Jourdan, AbdulSalam Kalaji, Gregory Kapfhammer, Mika Katara, Raimund Kirner, Pieter Koopman, Bogdan Korel, Willibald Krenn, Richard Kuhn, Victor Kuliamin, Raluca Lefticaru, Bruno Legeard, Johan Lilius, Michael Linschulte, Atif Memon, Mercedes Merayo, Marius Mikucionis, Tim Miller, Ralf Mitsching, Laurent Mounier, Henry Muccini, Brian Nielsen, Manuel Nunez, Ana Paiva, Amit Paradkar, Ioannis Parissis, Fabio Paternò, Patrizio Pelliccione, Alexandre Petrenko, Andrea Polini, Alexander Pretschner, Tuula Pääkkönen, Debra Richardson, Ismael Rodríguez, Gregg Rothermel, Vlad Rusu, Manoranjan Satpathy, Ina Schieferdecker, Rudolf Schlatte, Holger Schlingloff, Julien Schmaltz, José Silva, Adenilso Simao, Paul Strooper, Harold Thimbleby, Nikolai Tillmann, Paolo Tonella, Yves Le Traon, Guilherme Travassos, Jan Tretmans, Tugkan Tuglular, Hasan Ural, M. Uyar, Neil Walkinshaw, Martin Weiglhofer, Carsten Weise, Stephan Weissleder, Lee White, Marco Winckler, Jim Woodcock, Fatiha Zaïdi, and Tewfik Ziadi. Paul Ammann, Gordon Fraser 0001, Franz Wotawa |
Softw. Test. Verification Reliab. | 2 |
| 2012 | Automatically Generating Test Cases for Specification MiningabstractDynamic specification mining observes program executions to infer models of normal program behavior. What makes us believe that we have seen sufficiently many executions? The TAUTOKO (“Tautoko” is the Mãori word for “enhance, enrich.”) typestate miner generates test cases that cover previously unobserved behavior, systematically extending the execution space, and enriching the specification. To our knowledge, this is the first combination of systematic test case generation and typestate mining-a combination with clear benefits: On a sample of 800 defects seeded into six Java subjects, a static typestate verifier fed with enriched models would report significantly more true positives and significantly fewer false positives than the initial models. Valentin Dallmeier, Nikolai Knopp, Christoph Mallon, Gordon Fraser 0001, Sebastian Hack, Andreas Zeller |
IEEE Trans. Software Eng. | 4 |
| 2012 | Mutation-Driven Generation of Unit Tests and OraclesabstractTo assess the quality of test suites, mutation analysis seeds artificial defects (mutations) into programs; a nondetected mutation indicates a weakness in the test suite. We present an automated approach to generate unit tests that detect these mutations for object-oriented classes. This has two advantages: First, the resulting test suite is optimized toward finding defects modeled by mutation operators rather than covering code. Second, the state change caused by mutations induces oracles that precisely detect the mutants. Evaluated on 10 open source libraries, our μtest prototype generates test suites that find significantly more seeded defects than the original manually written test suites. Gordon Fraser 0001, Andreas Zeller |
IEEE Trans. Software Eng. | 1 |
| 2011 | Testing Container Classes: Random or Systematic?
Rohan Sharma, Milos Gligoric 0001, Andrea Arcuri, Gordon Fraser 0001, Darko Marinov |
FASE | 4 |
| 2011 | It is Not the Length That Matters, It is How You Control ItabstractThe length of test cases is a little investigated topic in search-based test generation for object oriented software, where test cases are sequences of method calls. While intuitively longer tests can achieve higher overall code coverage, there is always the threat of bloat - a complex phenomenon in evolutionary computation, where the length abnormally grows over time. In this paper, we show that bloat indeed also occurs in the context of test generation for object oriented software. We present different techniques to overcome the problem of length bloat, and evaluate all possible combinations of these techniques using different search lengths. Experiments on a set of difficult search targets selected from several open source and industrial projects show that the important choice in search-based testing is not the length of test cases, but how to make sure that this length does not become bloated. Gordon Fraser 0001, Andrea Arcuri |
ICST | 1 |
| 2011 | Exploiting Common Object Usage in Test Case GenerationabstractGenerated test cases are good at systematically exploring paths and conditions in software. However, generated test cases often do not make sense. We adapt test case generation to follow patterns of common object usage, as mined from code examples. Our experiments show that generated tests thus (a) reuse familiar usage patterns, making them easier to understand and (b) focus on common usage, thus respecting implicit preconditions and avoiding meaningless tests. Gordon Fraser 0001, Andreas Zeller |
ICST | 1 |
| 2011 | Generating parameterized unit testsabstractState-of-the art techniques for automated test generation focus on generating executions that cover program behavior. As they do not generate oracles, it is up to the developer to figure out what a test does and how to check the correctness of the observed behavior. In this paper, we present an approach to generate parameterized unit tests—unit tests containing symbolic pre- and postconditions char-acterizing test input and test result. Starting from concrete inputs and results, we use test generation and mutation to systematically generalize pre- and postconditions while simplifying the compu-tation steps. Evaluated on five open source libraries, the generat-ed parameterized unit tests are (a) more expressive, characterizing general rather than concrete behavior; (b) need fewer computation steps, making them easier to understand; and (c) achieve a higher coverage than regular unit tests. Gordon Fraser 0001, Andreas Zeller |
ISSTA | 1 |
| 2011 | Combining search-based and constraint-based testingabstractMany modern automated test generators are based on either meta-heuristic search techniques or use constraint solvers. Both approaches have their advantages, but they also have specific drawbacks: Search-based methods get stuck in local optima and degrade when the search landscape offers no guidance; constraint-based approaches, on the other hand, can only handle certain domains efficiently. In this paper we describe a method that integrates both techniques and delivers the best of both worlds. On a high-level view, our method uses a genetic algorithm to generate tests, but the twist is that during evolution a constraint solver is used to ensure that mutated offspring efficiently explores different control flow. Experiments on 20 case study examples show that on average the combination improves branch coverage by 28% over search-based techniques and by 13% over constraint-based techniques. Jan Malburg, Gordon Fraser 0001 |
ASE | 2 |
| 2011 | EvoSuite: automatic test suite generation for object-oriented softwareabstractTo find defects in software, one needs test cases that execute the software systematically, and oracles that assess the correctness of the observed behavior when running these test cases. This paper presents EvoSuite, a tool that automatically generates test cases with assertions for classes written in Java code. To achieve this, EvoSuite applies a novel hybrid approach that generates and optimizes whole test suites towards satisfying a coverage criterion. For the produced test suites, EvoSuite suggests possible oracles by adding small and effective sets of assertions that concisely summarize the current behavior; these assertions allow the developer to detect deviations from expected behavior, and to capture the current behavior in order to protect against future defects breaking this behavior. Gordon Fraser 0001, Andrea Arcuri |
SIGSOFT FSE | 1 |
| 2011 | On Parameter Tuning in Search Based Software Engineering
Andrea Arcuri, Gordon Fraser 0001 |
SSBSE | 2 |
| 2011 | Bytecode Testability Transformation
Yanchuan Li, Gordon Fraser 0001 |
SSBSE | 2 |
| 2011 | Guest Editorial for Special Section on Mutation Testing
Benoit Baudry, Jeremy S. Bradbury, Gordon Fraser 0001 |
Inf. Softw. Technol. | 3 |
| 2011 | Generating minimal fault detecting test suites for general Boolean specifications
Angelo Gargantini, Gordon Fraser 0001 |
Inf. Softw. Technol. | 2 |
| 2010 | Mutation-driven generation of unit tests and oraclesabstractTo assess the quality of test suites, mutation analysis seeds artificial defects (mutations) into programs; a non-detected mutation indicates a weakness in the test suite. We present an automated approach to generate unit tests that detect these mutations for object-oriented classes. This has two advantages: First, the resulting test suite is optimized towards finding defects rather than covering code. Second, the state change caused by mutations induces oracles that precisely detect the mutants. Evaluated on two open source libraries, our muTest prototype generates test suites that find significantly more seeded defects than the original manually written test suites. Gordon Fraser 0001, Andreas Zeller |
ISSTA | 1 |
| 2009 | An Evaluation of Model Checkers for Specification Based Test Case GenerationabstractUnder certain constraints the test case generation problem can be represented as a model checking problem, thus enabling the use of powerful model checking tools to perform the test case generation automatically. There are, however, several different model checking techniques, and to date there is little evidence and comparison on which of these techniques is best suited for test case generation. This paper presents the results of an evaluation of several different model checkers on a set of realistic formal specifications given in the SCR notation. For each specification test cases are generated for a set of coverage criteria with each of the model checkers using different configurations. The evaluation shows that the best suited model checking technique and optimization very much depend on the specification that is used to generate test cases. However, from the experiments we can draw general conclusions about which optimizations are useful and which model checking technique is best suited for which type of model. Finally, we demonstrate that by combining several model checking techniques it is possible to significantly speed up test case generation and also achieve full test coverage for cases where none of the techniques by itself would succeed. Gordon Fraser 0001, Angelo Gargantini |
ICST | 1 |
| 2009 | Using Spectrum-Based Fault Localization for Test Case GroupingabstractModel-based test case generation allows one to derive almost arbitrary numbers of test cases from models. If resulting test suites are executed against real implementations, there are often huge numbers of failed test cases. Thus, the analysis of the test execution, i.e. the identification of failures for error reporting, becomes a tedious and time consuming task. In this paper we investigate a technique for grouping test runs that most likely reveal the same failure. This reduces the post analysis time and enables the generation of small regression test suites. The test case grouping is implemented by means of spectrum-based fault localization at the level of the specification. We calculate the grouping by relating the spectra of the test cases. Besides a brief discussion of our approach we present results of applying our approach to the Session Initiation Protocol. Martin Weiglhofer, Gordon Fraser 0001, Franz Wotawa |
ASE | 2 |
| 2009 | Using coverage to automate and improve test purpose based testing
Martin Weiglhofer, Gordon Fraser 0001, Franz Wotawa |
Inf. Softw. Technol. | 2 |
| 2009 | Issues in using model checkers for test case generation
Gordon Fraser 0001, Franz Wotawa, Paul Ammann |
J. Syst. Softw. | 1 |
| 2009 | Testing with model checkers: a surveyabstractAbstract About a decade after the initial proposal to use model checkers for the generation of test cases we take a look at the results in this field of research. Model checkers are formal verification tools, capable of providing counterexamples to violated properties. Normally, these counterexamples are meant to guide an analyst when searching for the root cause of a property violation. They are, however, also very useful as test cases. Many different approaches have been presented, many problems have been solved, yet many issues remain. This survey paper reviews the state of the art in testing with model checkers. Copyright © 2008 John Wiley & Sons, Ltd. Gordon Fraser 0001, Franz Wotawa, Paul Ammann |
Softw. Test. Verification Reliab. | 1 |
| 2008 | Coverage-based Testing Using Qualitative Reasoning Models
Harald Brandl, Gordon Fraser 0001, Franz Wotawa |
SEKE | 2 |
| 2008 | Using Observer Automata to Select Test Cases for Test Purposes
Gordon Fraser 0001, Martin Weiglhofer, Franz Wotawa |
SEKE | 1 |
| 2008 | Using model-checkers to generate and analyze property relevant test-cases
Gordon Fraser 0001, Franz Wotawa |
Softw. Qual. J. | 1 |
| 2007 | Redundancy Based Test-Suite Reduction
Gordon Fraser 0001, Franz Wotawa |
FASE | 1 |
| 2007 | Test-Case Generation and Coverage Analysis for Nondeterministic Systems Using Model-CheckersabstractNondeterminism is used as a means of under specification or implementation choice in specifications, and it is often necessary if part of a system or the environment is unpredictable. The use of model-checker counterexamples as test-cases is a popular technique in model-based testing. Even though model-checkers can handle nondeterministic models for verification purposes, the use of nondeterministic models for test-case generation is not directly possible. A counterexample is an example execution path where alternative paths might also be valid. Consequently, testing could falsely identify correct implementations as erroneous. This paper describes how to use model-checkers to derive test-cases from nondeterministic models by applying postprocessing to the counterexamples. The influence of nondeterminism on coverage measurement with model-checkers is analyzed, and known coverage criteria are adapted. This is useful for the execution of test-cases on nondeterministic systems, where special treatment is necessary. Gordon Fraser 0001, Franz Wotawa |
ICSEA | 1 |
| 2006 | Using Model-Checkers for Mutation-Based Test-Case Generation, Coverage Analysis and Specification AnalysisabstractAutomated software testing is an important measure to improve software quality and the efficiency of the software development process. We present a model-checker based approach to automated test-case generation applying mutation to behavioral models and requirements specifications. Unlike previous related approaches, the requirements specification is at the center of this process. A property coverage criterion is used to show that resulting test-cases sufficiently exercise all aspects of the specification. A test-suite derived from the specification can only be as good as the specification itself. We demonstrate that analysis of the testcase generation process reveals important details about the specification, such as vacuity and how much of the model it covers, without requiring additional costly computations. Gordon Fraser 0001, Franz Wotawa |
ICSEA | 1 |
| 2005 | Plan Execution in Dynamic Environments
Gordon Fraser 0001, Gerald Steinbauer-Wagner, Franz Wotawa |
IEA/AIE | 1 |
| 2004 | A Modular Architecture for a Multi-purpose Mobile Robot
Gerald Steinbauer-Wagner, Gordon Fraser 0001, Arndt Mühlenfeld, Franz Wotawa |
IEA/AIE | 2 |
| 2004 | Cooperative Planning and Plan Execution in Partially Observable Dynamic Domains
Gordon Fraser 0001, Franz Wotawa |
RoboCup | 1 |