Test Case Generation from State Machine with OCL Constraints Using Search-Based Techniques

Software testing consumes half of the entire software development cost where test case generation is the most cost consuming activity in the whole process. The emergence of automatic test case generation has helped in reducing the cost eventually. Recently, model-based testing (MBT) for automatic te...

Full description

Saved in:
Bibliographic Details
Main Author: Ali Saeed, Aneesa Ali
Format: Dissertation
Language:English
Published: ProQuest Dissertations & Theses 01-01-2017
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Software testing consumes half of the entire software development cost where test case generation is the most cost consuming activity in the whole process. The emergence of automatic test case generation has helped in reducing the cost eventually. Recently, model-based testing (MBT) for automatic test case generation gains interest in industry and academia due to its provision of systematic, automated, and comprehensive testing. One of the input models for MBT is state machine model which currently widely utilized to model embedded systems. Generating test cases from Unified Modeling Language (UML) state machine models has two major challenges: generating feasible paths, and generating data to satisfy the paths. The existing infeasible path detection methods are restricted to extended finite state machine (EFSM) models with integer data type only. For detecting infeasible paths that involve Object Constraints Language (OCL) constraints, new method is needed to cover all the sophisticated constructs of OCL. For test data generation, the existing search-based techniques (SBTs) have been applied to satisfy only one OCL constraint by time. In order to generate optimal data to satisfy whole constraints in the feasible path, new method with SBTs is necessary to satisfy the whole constraints at the same time of the whole path executing. This thesis presents a method for generating feasible test cases from UML state machine models with OCL constraints. One contribution of this thesis is developing an efficient technique for detecting automatically infeasible paths that contain transitions with conflicted OCL constraints. A model-driven approach was used for generating abstract test cases from the feasible paths. This model driven approach was integrated with the proposed infeasible path detection method which based on analyzing various OCL constructs and operations. The second contribution of this thesis is developing an accurate search-based test data generator for generating automatically optimal test data to satisfy the whole constraints in the path. In the proposed search-based test data generator, a whole constraints analyzer and a fitness function that evolves itself based on the error feedback were proposed. The whole constraint analyzer and the fitness function were combined with four SBTs (genetic algorithm, evolutionary algorithm, simulating annealing, and quantum genetic algorithm). Case study evaluation was conducted based on three industrial open source case studies in order to evaluate empirically the significant of the performance of the proposed method. The results were statically analyzed using t-test to show the significance of the proposed method compared to the existing methods. The results show that the proposed infeasible path detection method was efficient and detect 99 percent of the infeasible paths in the three industrial systems. The results of the proposed search-based test data generator show significant performance compared to the existing search-based test data generator.
ISBN:9798379994891