A Systematic Review of Concolic Testing with Aplication of Test Criteria
Total Page:16
File Type:pdf, Size:1020Kb
A Systematic Review of Concolic Testing with Aplication of Test Criteria Lucilia Y. Araki and Leticia M. Peres Department of Informatics, Federal University of Paraná UFPR, R. Cel. H. dos Santos, 100, Curitiba, PR, Brazil Keywords: Software Testing, Test Criteria, Concolic Testing, Dynamic Symbolic Execution. Abstract: We present in this paper a systematic review, using (Biolchini et al., 2005) approach, of methods, techniques and tools regarding to concolic testing with application of test criteria. The test activity is the process of running a program with the intent of discovering defects. The search for test cases to increase the coverage of structural tests is being addressed by approaches that generate test cases using symbolic and concolic execution. Concolic testing is an effective technique for automated software testing, that aims to generate test inputs to locate failures of implementation in a program. Application of a test criterion is very important to ensure the quality of the test cases used. The number of elements exercised provides a measure of coverage that can be used to evaluate the test data set and consider the test activity to be closed. 1 INTRODUCTION and high code coverage (Seo and Kim, 2014). One limitation of current approaches is that they Software validation is intended to ensure that the only generate test data for an entire program or software developed complies with the original function. Current approaches do not generate test data requirements. The most commonly used validation to cover only a single slice of code. Symbolic approach in industry to improve software reliability execution have been used for more than three decades and quality is software testing. Testing is the process as an effective technique for automatic generation of of running a program with the purpose of revealing test data (Cadar and Sen 2013), this can be noticed defects (Myers, 1979) and involves producing a set through works such as (Majumdar and Sen, 2007); of tests and then running the system with these test (Qu and Robinson, 2011); (Godboley et al., 2013); cases. (Luckow, et al., 2016) that discuss the concolic test, Software testing is a fundamental software but none of them aims to study the test criteria in quality assurance activity. Its main purpose is to conjunction with the concolic test. execute a program with the objective of discovering The main goal through this work is provides an failures (Myers, 1979). The main challenge of the overview of a research area, identifying the quantity, test is to select input values to create good test cases types of research undertaken, available results, and that are likely to reveal faults. the frequency of publications over time to identify The problem of generating test data to achieve trends. Another goal is to relate articles that address adequate coverage is an inherently automated the concolic testing with test criteria and identify a activity. This automation ensures a significant weakness in the state of the art, related to the impact because the generation of test data is an concolic test and test coverage. We opted to perform arduous and time-consuming task. systematic review as a method of scientific Several techniques have been proposed to investigation that brings along relevant studies. generate input values automatically to improve This paper is organized as follows. Section 2 software testing. Each method covers a set of test provides the background. Section 3 presents our cases criteria that are used to determine the test methodology of systematic review. Section 3.1 requirements that must be satisfied by test cases. A details search strategy. Section 3.2 provides the technique of automatic generation of tests known as study selection. Section 4 discusses the results and concolic testing (Sen and Agha, 2006) has gained the analysis. Section 5 related work. Section 6 importance due to its low number of false positives concludes and discusses future work. 121 Araki, L. and Peres, L. A Systematic Review of Concolic Testing with Aplication of Test Criteria. DOI: 10.5220/0006776301210132 In Proceedings of the 20th International Conference on Enterprise Information Systems (ICEIS 2018), pages 121-132 ISBN: 978-989-758-298-1 Copyright c 2019 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved ICEIS 2018 - 20th International Conference on Enterprise Information Systems 2 BACKGROUND is a predicate to be satisfied that establishes certain test requirements, called required elements, that 2.1 Concolic Testing must be exercised during the execution of the program, that is, executed by a test data (Rapps and Weyuker, 1985). The idea is to generate the best Concolic testing (CONCrete + symbOLIC) data that can reveal most defects with low cost (Godefroid, Klarlund and Sen, 2005), (Sen, Marinov (Maldonado, 1991). The number of elements and Agha, 2005) also known as Dynamic Symbolic exercised provides a measure of coverage that can Execution (DSE) (Godefroid, Klarlund and Sen, be used to evaluate the test data set and consider the 2005), (Sen, Marinov and Agha, 2005), (Cadar et al., test activity to be closed. Testing criteria help the 2008). It is a test method for generating input data in tester organize the testing process. They should be a given program and it is executed both concretely chosen according to the available testing effort. Test and symbolically at the same time. In other words, coverage measures are defined as a relationship test inputs are generated dynamically from a real between test cases required to meet the criteria and executable program, rather than statically, from a those that were performed. Measures are used to model (Kähkönen et al., 2010). Concolic testing is obtain information on the completeness of the considered an important vulnerability detection integration tests. technique (Wang and Zeng, 2015). Test criteria are classified according to the Concolic testing uses concrete values as well as information used to derive the test requirements symbolic values for inputs and executes a program established from three basic techniques: structural, both concretely and symbolically. This is called which uses internal structure of program to derive concolic execution. Concrete execution is a part of test data; functional, which derives test data based concolic execution and constitutes the normal on functional requirements of software; and based execution of the program. Symbolic execution part on defects that derive test data based on common of concolic execution collects symbolic constraints defects committed during software development. over the symbolic input values at each branch point Branch coverage is a testing requirement that all encountered along the concrete execution path. branches of the program must be exercised. A Concolic testing starts by first executing a branch is the result of a decision, so branch coverage program under test with any concrete input values. simply the measures what the decision results have Execution of the program can branch into different been tested (Zhu; Patrick and John, 1997). That is, execution paths at branching statements that depends all branches (decision) taken from each path, true on input values. When executing such statements, and false. This helps validate all branches in the concolic testing constructs a symbolic constraint that code, ensuring that no branch leads to abnormal describes the possible input values causing the application behaviour. program to take the true or false branch at the Path coverage criterion requires that all paths statement in question. A path constraint is a from the program input to its output run during the conjunction of these symbolic constraints and new test, though traversing all paths do not guarantee that test inputs for the subsequent test runs are generated all errors will be detected. Another problem is that by solving them. Typically this is done by the using programs with loops can have an infinite number of SMT (Satisfiability-Modulo-Theories) solvers with paths and therefore the criteria of all paths must be integer arithmetic or bit-vectors as the underlying. replaced by a weaker one that selects only a subset of the paths 2.2 Test Criteria Data flow criteria are based on the analysis of the data flow of the program to be tested. It consists in In designing test planning, one of the steps is design focusing the assignment of values to the variables the test strategy. Test strategy comprises defining and the later use of these values, establishing that the following items: the test level, that is, definition of occurrence of a variable can be of two types: the software development phase in that the test will definition and use (Rapps and Weyuker, 1985; be applied; test technique to be used; test criterion to Myers, 1979). be adopted; type of test to be applied in software The test criterion is used to select and evaluate (Crespo et al., 2004). the test cases in order to increase the chances of The application of a test criterion is very causing failures or, when this does not happen, to important to ensure quality of test cases used. They establish a high level of confidence in the assist in choosing the best inputs (test data) from a correctness of the product. generally infinite and impractical set. A test criteria 122 A Systematic Review of Concolic Testing with Aplication of Test Criteria The process of applying a structural criterion and Sen (2005) and in Sen, Marinov and Agha consists of analysing the implementation of the (2005), because of it the interval of years of application. Next, the paths of implementation to be publication to be between 2005 and 2017 in the executed are defined. After that, the test data from search string. program inputs domain is selected to ensure that the selected paths are executed. Then, expected the 3.1 Search Strategy outputs for each of chosen inputs are determined.