Abstract

Testing software product lines (SPLs) is difficult due to a huge number of possible products to be tested. Recently, there has been a growing interest in similarity-based testing of SPLs, where similarity is used as a surrogate metric for the <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage. In this context, one of the primary goals is to sample, by optimizing similarity metrics using search-based algorithms, a small subset of test cases (i.e., products) as dissimilar as possible, thus potentially making more <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise combinations covered. Prior work has shown, by means of empirical studies, the great potential of current similarity-based testing approaches. However, the rationale of this testing technique deserves a more rigorous exploration. To this end, we perform correlation analyses to investigate how similarity metrics are correlated with the <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage. We find that similarity metrics generally have significantly positive correlations with the <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage. This well explains why similarity-based testing works, as the improvement on similarity metrics will potentially increase the <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage. Moreover, we explore, for the first time, the use of the novelty search (NS) algorithm for similarity-based SPL testing. The algorithm rewards “novel” individuals, i.e., those being different from individuals discovered previously, and this well matches the goal of similarity-based SPL testing. We find that the novelty score used in NS has (much) stronger positive correlations with the <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage than previous approaches relying on a genetic algorithm (GA) with a similarity-based fitness function. Experimental results on 31 software product lines validate the superiority of NS over GA, as well as other state-of-the-art approaches, concerning both <inline-formula><tex-math notation="LaTeX">$t$</tex-math></inline-formula> -wise coverage and fault detection capacity. Finally, we investigate whether it is useful to combine two satisfiability solvers when generating new individuals in NS, and how the performance of NS is affected by its key parameters. In summary, looking for novelty provides a promising way of sampling diverse test cases for SPLs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call