Lightweight Lexical Test Prioritization for Immediate Feedback The practice of unit testing enables programmers to obtain automated feedback on whether a currently edited program is consistent with the expectations specified in test cases. Feedback is most valuable when it happens immediately, as defects can be corrected instantly before they become harder to fix. With growing and longer running test suites, however, feedback is obtained less frequently and lags behind program changes.  :64,objective of test prioritization is to rank tests so that defects, if present, are found as early as possible or with the least costs. While there are numerous static approaches that output a ranking of tests solely based on the current version of a program, we focus on changebased test prioritization, which recommends tests that likely fail in response to the most recent program change. The canonical approach relies on coverage data and prioritizes tests that cover the changed region, but obtaining and updating coverage data is costly. More recently, information retrieval techniques that exploit overlapping vocabulary between change and tests have proven to be powerful, yet lightweight.  :173,this work, we demonstrate the capabilities of information retrieval for prioritizing tests in dynamic programming languages using Python as example. We discuss and measure previously understudied variation points, including how contextual information around a program change can be used, and design alternatives to the widespread emphTFIDF retrieval model tailored to retrieving failing tests.  obtain program :227,changes with associated test failures, we designed a tool that generates a large set of faulty :227,changes from version history along with their test results. Using :173,this data set, we compared existing and new lexical prioritization strategies using four opensource Python projects, showing large improvements over untreated and random test orders and results consistent with related work in statically typed languages.  :291,conclude that lightweight IRbased prioritization strategies are effective tools to predict failing tests in the absence of coverage data or when static analysis is intractable like in dynamic languages. This knowledge can benefit both individual programmers that rely on fast feedback, as well as operators of continuous integration infrastructure, where resources can be freed sooner by detecting defects earlier in the build cycle.

Incorporating faultproneness estimations into coveragebased test case prioritization methods Abstract   Context: During the development process of a software program, regression testing is used to ensure that the correct behavior of the software is retained after updates to the source code. This regression testing becomes costly over time as the number of test cases increases and it makes sense to prioritize test cases in order to execute faultdetecting test cases as soon as possible. There are many coveragebased test case prioritization (TCP) methods that only use the code coverage data to prioritize test cases. By incorporating the faultproneness estimations of code units into the coveragebased TCP methods, we can improve such techniques.  Objective: In this paper, we aim to propose an approach which improves coveragebased TCP methods by considering the faultproneness distribution over code units. Further, we present the results of an empirical study that shows using our proposed approach significantly improves the additional strategy, which is a widely used coveragebased TCP method.  Method: The approach presented in this study uses the bug history of the software in order to introduce a defect prediction method to learn a neural network model. This model is then used to estimate faultproneness of each area of the source code and then the estimations are incorporated into coveragebased TCP methods. Our proposed approach is a general idea that can be applied to many coveragebased methods, such as the additional and total TCP methods.  Results: The proposed methods are evaluated on datasets collected from the development history of five realworld projects including 357 versions in total. The experiments show that using an appropriate bug history can improve coveragebased TCP methods.  Conclusion: The proposed approach can be applied to various coveragebased TCP methods and the experiments show that it can improve these methods by incorporating estimations of code units faultproneness.