[Paper Review] Searching for test data with feature diversity
This paper proposes search-based methods to generate test data with diversity tailored to specific features (e.g., string length, numeric character count), evaluating 10 approaches in a two-dimensional feature space. A hill climbing search proved most efficient for covering target feature regions, though random sampling remained competitive, suggesting hybrid or model-assisted strategies are optimal for recurring testing scenarios.
There is an implicit assumption in software testing that more diverse and varied test data is needed for effective testing and to achieve different types and levels of coverage. Generic approaches based on information theory to measure and thus, implicitly, to create diverse data have also been proposed. However, if the tester is able to identify features of the test data that are important for the particular domain or context in which the testing is being performed, the use of generic diversity measures such as this may not be sufficient nor efficient for creating test inputs that show diversity in terms of these features. Here we investigate different approaches to find data that are diverse according to a specific set of features, such as length, depth of recursion etc. Even though these features will be less general than measures based on information theory, their use may provide a tester with more direct control over the type of diversity that is present in the test data. Our experiments are carried out in the context of a general test data generation framework that can generate both numerical and highly structured data. We compare random sampling for feature-diversity to different approaches based on search and find a hill climbing search to be efficient. The experiments highlight many trade-offs that needs to be taken into account when searching for diversity. We argue that recurrent test data generation motivates building statistical models that can then help to more quickly achieve feature diversity.
Motivation & Objective
- Address the lack of research on feature-specific test data diversity, where diversity is targeted within defined input features rather than generally.
- Identify and evaluate multiple search-based methods to generate test data that are diverse according to user-defined features such as input size or character composition.
- Compare the efficiency and coverage of different search strategies (e.g., hill climbing, random sampling, metaheuristics) in exploring a defined feature space.
- Investigate how statistical models, such as Gaussian Processes, can accelerate future test data generation in repeated testing scenarios like regression testing.
- Provide a framework for selecting appropriate search algorithms based on testing goals, feature space characteristics, and efficiency trade-offs.
Proposed method
- Define the Feature-Specific Test Diversity (FSTD) problem as generating a diverse and complete set of test inputs within a specific region of a multi-dimensional feature space.
- Implement 10 distinct search and sampling strategies, including random sampling, hill climbing, adaptive random testing, and metaheuristic search (e.g., NMCS), to explore the feature space.
- Use a test data generation framework capable of producing both numerical and structured data (e.g., strings), with features extracted as measurable attributes (e.g., length, digit count).
- Evaluate methods based on coverage of the target feature space and efficiency (coverage per time unit), using a two-dimensional feature space as a testbed.
- Integrate statistical modeling (e.g., Gaussian Processes) to model the mapping from feature space to parameter space, enabling faster, informed test data generation in repeated testing.
- Assess the impact of stochastic model granularity in NMCS, finding that larger, more detailed models improve search performance across all methods.
Experimental results
Research questions
- RQ1Which search strategy achieves the highest coverage of the target feature space with the fewest time steps in a feature-specific test data generation task?
- RQ2How do the performance characteristics of hill climbing, random sampling, and metaheuristic approaches compare in terms of diversity coverage and efficiency?
- RQ3To what extent can statistical models of the input space (e.g., Gaussian Processes) improve the efficiency of recurrent test data generation?
- RQ4How does the choice of stochastic model granularity affect the performance of search-based test data generation, particularly in NMCS?
- RQ5What are the trade-offs between bias, efficiency, and robustness when selecting a search algorithm for feature-specific test diversity?
Key findings
- Hill climbing search achieved the highest coverage of the target feature space and was the most efficient per time step, outperforming other search-based methods.
- Random sampling performed surprisingly well, offering a less biased alternative with competitive coverage, especially when combined with larger stochastic models.
- The choice of stochastic model significantly impacted performance: larger, more detailed models improved the efficiency of all search algorithms, including NMCS.
- Hybrid approaches combining random sampling with advanced search methods (e.g., NMCS) showed strong potential, particularly for escaping local constraints in the search space.
- No single algorithm was universally superior; the optimal choice depends on the testing context, feature space structure, and desired balance between bias and efficiency.
- Recurrent test data generation benefits from statistical models (e.g., Gaussian Processes) that map feature values to parameter space, enabling faster and more targeted diversity in regression testing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.