886 research outputs found
Recommended from our members
Techniques for Efficient and Effective Mobile Testing
The booming mobile app market attracts a large number of developers. As a result, the competition is extremely tough. This fierce competition leads to high standards required for mobile apps, which mandates efficient and effective testing. Efficient testing requires little effort to use, while effective testing checks that the app under test behaves as expected. Manual testing is highly effective, but it is costly. Automatic testing should come to the rescue, but current automatic methods are either ineffective or inefficient. Methods using implicit specifications – for instance, “an app should not crash” for catching fail-stop errors – are ineffective because they cannot find semantic problems. Methods using explicit specifications such as test scripts are inefficient because they require huge developer effort to create and maintain specifications. In this thesis, we present our two approaches for solving these challenges. We first built the AppDoctor system which efficiently tests mobile apps. It quickly explores an app then slowly but accurately verifies the potential problems to identify bugs without introducing false positives. It uses dependencies discovered between actions to simplify its reports. Our second approach, implemented in the AppFlow system, leverages the ample opportunity of reusing test cases between apps to gain efficiency without losing effectiveness. It allows common UI elements to be used in test scripts then recognizes these UI elements in real apps using a machine learning approach. The system also allows tests to be specified in reusable pieces, and provides a system to synthesize complete test cases from these reusable pieces. It enables robust tests to be created and reused across apps in the same category. The combination of these two approaches enables a developer to quickly test an app on a great number of combinations of actions for fail-stop problems, and effortlessly and efficiently test the app on most common scenarios for semantic problems. This combination covers most of her test requirements and greatly reduces her burden in testing the app
Finding The Lazy Programmer's Bugs
Traditionally developers and testers created huge numbers of explicit tests, enumerating interesting cases, perhaps
biased by what they believe to be the current boundary conditions of the function being tested. Or at
least, they were supposed to.
A major step forward was the development of property testing. Property testing requires the user to write a few
functional properties that are used to generate tests, and requires an external library or tool to create test data
for the tests. As such many thousands of tests can be created for a single property. For the purely functional
programming language Haskell there are several such libraries; for example QuickCheck [CH00], SmallCheck
and Lazy SmallCheck [RNL08].
Unfortunately, property testing still requires the user to write explicit tests. Fortunately, we note there are
already many implicit tests present in programs. Developers may throw assertion errors, or the compiler may
silently insert runtime exceptions for incomplete pattern matches.
We attempt to automate the testing process using these implicit tests. Our contributions are in four main
areas: (1) We have developed algorithms to automatically infer appropriate constructors and functions needed
to generate test data without requiring additional programmer work or annotations. (2) To combine the
constructors and functions into test expressions we take advantage of Haskell's lazy evaluation semantics by
applying the techniques of needed narrowing and lazy instantiation to guide generation. (3) We keep the type
of test data at its most general, in order to prevent committing too early to monomorphic types that cause
needless wasted tests. (4) We have developed novel ways of creating Haskell case expressions to inspect elements
inside returned data structures, in order to discover exceptions that may be hidden by laziness, and to make
our test data generation algorithm more expressive.
In order to validate our claims, we have implemented these techniques in Irulan, a fully automatic tool for
generating systematic black-box unit tests for Haskell library code. We have designed Irulan to generate high
coverage test suites and detect common programming errors in the process
Semantically Enhanced Software Documentation Processes
High-quality software documentation is a substantial issue for
understanding software systems. Shorter time-to-market software cycles increase
the importance of automatism for keeping the documentation up to
date. In this paper, we describe the automatic support of the software documentation process using semantic technologies. We introduce a software documentation ontology as an underlying knowledge base. The defined ontology is populated automatically by analysing source code, software documentation and code execution. Through selected results we demonstrate that the use of such semantic systems can support software documentation processes efficiently
Moving beyond Deletions: Program Simplification via Diverse Program Transformations
To reduce the complexity of software, Developers manually simplify program
(known as developer-induced program simplification in this paper) to reduce its
code size yet preserving its functionality but manual simplification is
time-consuming and error-prone. To reduce manual effort, rule-based approaches
(e.g., refactoring) and deletion-based approaches (e.g., delta debugging) can
be potentially applied to automate developer-induced program simplification.
However, as there is little study on how developers simplify programs in
Open-source Software (OSS) projects, it is unclear whether these approaches can
be effectively used for developer-induced program simplification. Hence, we
present the first study of developer-induced program simplification in OSS
projects, focusing on the types of program transformations used, the
motivations behind simplifications, and the set of program transformations
covered by existing refactoring types. Our study of 382 pull requests from 296
projects reveals that there exist gaps in applying existing approaches for
automating developer-induced program simplification. and outlines the criteria
for designing automatic program simplification techniques. Inspired by our
study and to reduce the manual effort in developer-induced program
simplification, we propose SimpT5, a tool that can automatically produce
simplified programs (semantically-equivalent programs with reduced source lines
of code). SimpT5 is trained based on our collected dataset of 92,485 simplified
programs with two heuristics: (1) simplified line localization that encodes
lines changed in simplified programs, and (2)checkers that measure the quality
of generated programs. Our evaluation shows that SimpT5 are more effective than
prior approaches in automating developer-induced program simplification
- …