Preference based multi-objective algorithms applied to the variability testing of software product lines
Introduction
The variability testing of Software Product Lines (SPLs) is devoted to test a set of products derived from the SPL variability model. The most popular and used variability model is the Feature Model (FM) (Kang et al., 2002), considered as the facto standard in the SPL engineering. Ideally, all the products should be tested, but the number of possible products grows exponentially with the number of features and the exhaustive testing is, in general, infeasible (Cohen et al., 2006). Then, the use of a test criterion can help in the selection of the best products to be tested. A test criterion is a predicate to be satisfied by the test data set and is generally used to consider that the testing activity has ended (Rapps and Weyuker, 1985).
In the FM context, the test cases are SPL products and these ones need to satisfy some criteria. The most popular criteria (Cohen, Dwyer, Shi, 2006, Lamancha, Usaola, 2010, Perrouin, Sen, Klein, Baudry, le Traon, 2010, Henard, Papadakis, Perrouin, Klein, Heymans, Le Traon, 2014, McGregor, 2001) are the ones derived from combinatorial testing (Cohen et al., 1996). Among them, the pairwise testing is the most used (Cohen, Dwyer, Shi, 2006, Lamancha, Usaola, 2010, McGregor, 2001, Oster, Zink, Lochau, Grechanik, 2011, Uzuncaova, Khurshid, Batory, 2010), which requires the selection of products to include all valid pairs of features present in the FM. The number of covered pairs is used to evaluate the set of products generated.
More recent works are based on mutation testing (Ferreira, Vergilio, Quináia, 2013, Henard, Papadakis, Perrouin, Klein, Le Traon, 2013, Arcaini, Gargantini, Vavassori, 2015, Lackner, Schmidt, 2014, Reuling, Bürdek, Rotärmel, Lochau, Kelter, 2015). Mutant FMs are generated to describe typical faults that can be present in the FM. The idea is to find, for each mutant, a product that is validated by the mutant and is not validated by the original FM (Ferreira et al., 2013), or otherwise, it is valid for the FM but it is invalid for the mutant. When a difference exists the mutant is considered killed. At the end, the mutation score is produced and used to evaluate a set of products according to the number of killed mutants.
The selection of products for SPL testing can be impacted by different factors such as: criterion coverage; cost (given by the number of products); efficacy (related to the number of faults found); and so on. Different solutions can be considered as good alternatives, according to the testing goals and the testers’ needs. Due to this, such a problem has been efficiently solved by Evolutionary Multi-Objective Algorithms (EMOAs), in the field known as Search-Based Software Engineering (SBSE) (Harman et al., 2012). Surveys on search-based SPL engineering (Harman, Jia, Krinke, Langdon, Petke, Zhang, 2014, Lopez-Herrejon, Linsbauer, Egyed, 2015) shows that there are many works devoted to this research subject (Lopez-Herrejon, Chicano, Ferrer, Egyed, Alba, 2013, Matnei Filho, Vergilio, 2015, Matnei Filho, Vergilio, 2016). The most used algorithms are Non-dominated Sorting Genetic Algorithm-II (NSGA-II) (Deb et al., 2002), Strength Pareto Evolutionary Algorithm (SPEA2) (Zitzler et al., 2001), and Indicator-Based Evolutionary Algorithm (IBEA) (Zitzler and Künzli, 2004). Such algorithms provide a set called non-dominated solutions, distributed over the Pareto-front. At the end, all these solutions are considered Pareto-equivalent and good solutions. The Decision Maker (DM) is then responsible for choosing the solution to be used.
However, this choice is not always easy for the DM, because the cardinality of the non-dominated solution set is, most times, very large, especially if the number of objectives becomes high. In our problem, that is, product selection for SPL testing, it is not true that all the solutions are equivalent from the DM’s point of view. For instance, the DM, (the tester in our case) is not usually interested in solutions with low coverage. Therefore, it is clear that the objectives are not equally important for the DM.
Cases like that are very common in SBSE, and to cope with these limitations, a new field has emerged, named Preference and Search-Based Software Engineering (PSBSE) (Ferreira et al., 2017c). PSBSE is the SBSE sub-research field devoted to the application of preference and search-based algorithms to solve software engineering problems. A preference-based algorithm is the one that incorporates human preferences, intuition, emotion or psychological aspects in the optimization process (Takagi, 2001). There are different ways to incorporate the user preferences (Branke, Deb, Miettinen, Słowinski, 2008, Ferreira, Vergilio, de Souza, 2017): before (a priori), during (interactively), or after (a posteriori) the solution evolution process.
The best way depends on several conditions related to the DM’s personality, context, problem’s characteristics, and so on. For example, consider our SPL testing problem, in many cases there is a coverage level for the system under test or a cost budget, which are known a priori. In this way, it is suitable an a priori approach instead of an interactively one that requires a lot of effort and can increase the DM’s burden. It is important to notice that a recent mapping on PSBSE (Ferreira et al., 2017c) does not mention this kind of approach applied in the SPL context.
Considering the above-mentioned facts, in this paper we introduce a Preference-Based Evolutionary Multi-objective Algorithm (PEMOA) approach to select products for the variability test of SPLs. The goal is to find the best solutions according to the tester’s needs, and considering trade-offs related to some factors such as cost, efficacy and criteria coverage. The proposed approach has two main characteristics:
- •
It is a mutiobjective approach. This allows the use of multiple factors that impact our problem. Ferreira et al. (2017c) point out that most solutions in PSBSE are mono-objective. Besides, the authors consider the use of multi-objective approach is a research gap in PSBSE;
- •
It applies two PEMOAs based on the well-known and used algorithm NSGA-II. They are: Reference Point-based NSGA-II (R-NSGA-II) (Deb et al., 2006) and Reference Solution-based NSGA-II (r-NSGA-II) (Said et al., 2010). Both algorithms are based on the Reference Point (RP) concept. For this problem, the tester is interested only in a subset of solutions of the Pareto front, and the preferred part of the Pareto optimal region from the DM’s point of view is called Region of Interest (ROI). Then, the DM’s preference guides the PEMOA in the search, which results in a greater number of solutions in the ROI, close to the RP. This eases the task of choosing the final solution to be used.
These characteristics present some advantages: i) the approach contributes to the PSBSE field and can be used to solve other similar Software Engineering problems; ii) the preferences can be provided a priori, requiring reduced effort from the DM; iii) the existence of a ROI facilitates the visualization of the solutions (in the case of problems with two or three objectives) and recognizing if they satisfy the DM’s preferences; and iv) the approach can provide a greater number of solutions in the ROI space, reducing the number of uninteresting solutions and, consequently, easing the decision making task.
The paper also presents results that compare both PEMOAs, considering formulations to the problem with two and three objectives. The results show PEMOAs can generate better solutions than NSGA-II by avoiding uninteresting solutions (outside the ROI space). In general, R-NSGA-II presents the best performance and generates a greater number of solutions inside the ROI.
The paper is organized as follows. Section 2 reviews main PSBSE concepts and the PEMOAs used in this work. Section 3 contains related work. Section 4 introduces the proposed approach: problem formulation, search operators and objective functions. Section 5 describes how the empirical evaluation was conducted: research questions, quality indicators, used FMs, and algorithms configuration. Section Section 6 presents and analyses the results. Section 7 discusses the main threats to the validity of our results. Finally, Section 8 concludes the work and presents future research directions.
Section snippets
Preference and search-based software engineering
As mentioned before, the Preference and Search-Based Software Engineering (PSBSE) field is the SBSE sub-field devoted to the application of preference-based algorithms to solve software engineering problems (Ferreira et al., 2017c). A preference-based algorithm is the one that incorporates human preferences, intuition, emotion or psychological aspects in the optimization process (Takagi, 2001). To this end, the Decision Maker (DM) plays a key role, since the DM is the person (or a group of
Related work
Search-based algorithms have been applied to solve different problems in the SPL engineering (Harman, Jia, Krinke, Langdon, Petke, Zhang, 2014, Lopez-Herrejon, Linsbauer, Egyed, 2015), including variability testing of SPLs. We can find works on prioritization and selection of test cases. Both tasks are viewed as complementary. The work of Parejo et al. (2016) proposes a multi-objective approach for prioritization of SPL products in order to accelerate fault-detection. Existing works proposing
Proposed approach
The proposed approach has as the main goal to generate solutions that best satisfy the preferences expressed by the DM. Each solution represents a set of products that optimizes different factors that impact the variability testing of SPLs.
Variability testing is responsible for ensuring that the products derived from the variability model match expected requirements. Our approach is based on the Feature Model (FM), which is largely adopted in the industry.
Fig. 3 shows an example of FM for a
Empirical evaluation
The hypothesis of this work is that our approach is capable to automatically generate a better set of solutions considering the DM preferences, given by the RP provided by the tester, and avoiding uninteresting solutions. According to such goals, the experiment was guided by the following research questions:
RQ1: How do the results of the PEMOAs compare to the results obtained by the traditional NSGA-II and to a random selection?
RQ2: What is the best PEMOA? How do r-NSGA-II and R-NSGA-II compare?
Results and analysis
In this section, we present the experimental results and analyze them aiming at answering the posed questions. To ease understanding, we present the results of both experiments (formulations) in separated sections.
Threats to validity
In our approach, we used the tool FMTS, which makes use of the FaMa framework to deal with resource model constraints and derive products. However, the approach is independent of the solver being used and could be used without any modifications with SAT solvers, for example. Other objectives could be used as well. To do this it is only necessary to implement other procedures to calculate the input matrices.
In our evaluation, most of the FMs are small, when compared to the ones used in the
Concluding remarks
This work introduces a PEMOA approach to derive products for the SPL testing. The approach is multi-objective and allows the use of different factors that impact the problem, taking into account the preferences and needs of the tester. As another advantage, the approach is a priori and based on the RP method. This makes it different from other approaches found in the SBSE field, which are mono-objective, and interactive, requiring the DM’s intervention many times during the optimization
Acknowledgments
This work is supported by Brazilian agencies CAPES and CNPq, grants: 307762/2015-7 and 473899/2013-2.
Helson Luiz Jakubovski Filho receives the M.S. (2018) degree from Federal University of Paraná (UFPR) in Computer Science. His main interest are bio-inspired computation, metaheuristic, multiobjective optimization, and preference-based optimization algorithms.
References (62)
- et al.
Preference incorporation in evolutionary multiobjective optimization: a survey of the state-of-the-art
- et al.
Evolutionary search-based test generation for software product line feature models
Proceedings of the 24th International Conference on Advanced Information Systems Engineering (CAiSE’12)
(2012) - et al.
SMTIBEA: A hybrid multi-objective optimization algorithm for configuring large constrained software product lines
Softw. Syst. Mod.
(2017) - et al.
A mutation and multi-objective test data generation approach for feature testing of software product lines
Proceedings of the 29th Brazilian Symposium on Software Engineering (SBES’15)
(2015) - et al.
A multi-objective test data generation approach for mutation testing of feature models
J. Softw. Eng. Res.Dev.
(2016) - et al.
Multi-objective test case prioritization in highly configurable systems: a case study
J. Syst. Softw.
(2016) - et al.
Selecting software test data using data flow information
IEEE Trans. Softw. Eng.
(1985) - et al.
Incremental test generation for software product lines
IEEE Trans. Softw. Eng.
(2010) - et al.
Generating tests for detecting faults in feature models
Proceedings of the 8th International Conference on Software Testing, Verification and Validation (ICST’15)
(2015) - et al.
On the modularization of feature models
First European Workshop on Model Transformation
(2005)
Software product line engineering with feature models
Overload J.
Multiobjective optimization: Interactive and evolutionary approaches
Multiobjective Optimization - Interactive and evolutionary approaches
The combinatorial design approach to automatic test generation
IEEE Softw.
Coverage and adequacy in software product line testing
Proceedings of the Workshop on Role of Software Architecture for Testing and Analysis (ROSATEA’06)
A fast and elitist multiobjective genetic algorithm: NSGA-II
IEEE Trans. Evol. Comput.
Reference point based multi-objective optimization using evolutionary algorithms
Int. J. Comput. Intell. Res.
Jmetal: a java framework for multi-objective optimization
Adv. Eng. Softw.
An interactive software development workbench based on biomimetic algorithms
Technical Report
A mutation approach to feature testing of software product lines
Proceedings of the 25th International Conference on Software Engineering and Knowledge Engineering (SEKE’13)
A mutation approach to feature testing of software product lines
Int. J. Softw. Eng.Knowl. Eng. (IJSEKE)
Product selection based on upper confidence bound MOEA/D-DRA for testing software product lines
Proceedings of the Congress on Evolutionary Computation (CEC ’16)
Hyper-heuristic based product selection for software product line testing
IEEE Comput. Intell. Mag.
Incorporating user preferences in search-based software engineering: a systematic mapping study
Inf. Softw. Technol.
Search based software engineering for software product line engineering: A survey and directions for future work
Proceedings of the 18th International Software Product Line Conference (SPLC’14)
Search-based software engineering: trends, techniques and applications
Comput. Surv.
Combining multi-objective search and constraint solving for configuring large software product lines
International Conference on Software Engineering (ICSE)
Mutation-based generation of software product line test configurations
International Symposium on Search Based Software Engineering (SSBSE’14)
Bypassing the combinatorial explosion: using similarity to generate and prioritize T-wise test configurations for software product lines
IEEE Trans. Softw. Eng.
Assessing software product line testing via model-based mutation: an application to similarity testing
Proceedings of the 6th International Conference on Software Testing, Verification and Validation (ICSTW’13)
Multi-objective test generation for software product lines
Proceedings of the 17th International Software Product Line Conference (SPLC’13)
Cited by (0)
Helson Luiz Jakubovski Filho receives the M.S. (2018) degree from Federal University of Paraná (UFPR) in Computer Science. His main interest are bio-inspired computation, metaheuristic, multiobjective optimization, and preference-based optimization algorithms.
Thiago Nascimento Ferreira is a Ph.D. student at Computer Science Department on Federal University of Parana (UFPR), Brazil. He receives the M.S. (2015) and B.S. (2012) degrees from State University of Ceará (UECE), Brazil, in Computer Science. His main interest are bio-inspired computation, multiobjective optimization and preference-based optimization algorithms focused on Search-based Software Engineering (SBSE).
Silvia Regina Vergilio received Master and Doctoral degress from University of Campinas (UNICAMP), Brazil. She is currently a professor of Software Engineering in the Computer Science Department of Federal University of Paraná (UFPR), Brasil, where she leads the Research Group on Software Engineering. She has involved in several projects and her research is mainly supported by CNPq (PQ Level 2). Her research interests include software testing, software reliability, Software Product Lines (SPLs) and Search-based Software Engineering (SBSE). She serves as assistant editor of the Journal of Software Engineering: Research and Development, and acts as peer reviewer for diverse international journals. She serves on the Program Committe of the main Brazilian Software Engineering conferences and other international ones, mainly related to Search-Based Software Engineering and software testing. Her publications list includes many papers devoted to the SBSE field, where she is very knonw. She has contributed to consolidate such a field in Brazil.