Generating Boundary Values from OCL Constraints using Constraints Rewriting and Search Algorithms

被引:0
|
作者
Ali, Shaukat [1 ]
Yue, Tao [1 ,2 ]
Qiu, Xiang [3 ]
Lu, Hong [1 ]
机构
[1] Simula Res Lab Norway, Fornebu, Norway
[2] Univ Oslo, N-0316 Oslo, Norway
[3] Beihang Univ, Sch Comp Sci & Engn, Beijing 100191, Peoples R China
关键词
UML; Object Constraint Language; Search-based testing; Test data; Boundary Value Analysis;
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
A key component of model-based testing is the generation of test data from constraints (e.g., specified in the Object Constraint Language (OCL)) associated with models e.g., specified in the Unified Modeling Language (UML). The quality of test data eventually determines the effectiveness of test cases, e.g., fault detection and coverage. A simple way to generate test data from an OCL constraint is to find a set of values for all the variables that satisfies the constraint. One way of improving the quality of test data is by generating test data at the boundaries of each variable in the constraint. In this paper, we extend our search-based test data generation approach to generate test data at the boundaries of each variable involved in a constraint. We present different cases of constraints involving different types of variables and how we rewrite them in order to automatically generate boundary values using our existing OCL Solver called EsOCL based on a set of heuristics. We empirically evaluated our heuristics using three search algorithms, i.e., Genetic Algorithm, (1+1) Evolutionary Algorithm, and Alternating Variable Method, on industrial OCL constraints from our previous work. Results show that AVM on average achieved a 95% of success rate and outperformed the rest of the algorithms in finding all the boundary values of constraints in fewer generations.
引用
收藏
页码:379 / 386
页数:8
相关论文
共 50 条
  • [21] From Core OCL Invariants to Nested Graph Constraints
    Arendt, Thorsten
    Habel, Annegret
    Radke, Hendrik
    Taentzer, Gabriele
    GRAPH TRANSFORMATION, 2014, 8571 : 97 - 112
  • [22] Search-Based MC/DC Test Data Generation With OCL Constraints
    Sartaj, Hassan
    Iqbal, Muhammad Zohaib
    Jilani, Atif Aftab Ahmed
    Khan, Muhammad Uzair
    SOFTWARE TESTING VERIFICATION & RELIABILITY, 2025, 35 (01):
  • [23] Extracting OCL Integrity Constraints From Object Relational Database
    Toufik, Fouad
    Bahaj, Mohamed
    2018 INTERNATIONAL CONFERENCE ON CONTROL, AUTOMATION AND DIAGNOSIS (ICCAD), 2018,
  • [24] Rewriting queries using views with value integrity constraints
    Jaudoin, H
    STAIRS 2004, 2004, 109 : 38 - 49
  • [25] Translating essential OCL invariants to nested graph constraints for generating instances of meta-models
    Radke, Hendrik
    Arendt, Thorsten
    Becker, Jan Steffen
    Habel, Annegret
    Taentzer, Gabriele
    SCIENCE OF COMPUTER PROGRAMMING, 2018, 152 : 38 - 62
  • [26] A Search-Based Approach to Generate MC/DC Test Data for OCL Constraints
    Sartaj, Hassan
    Iqbal, Muhammad Zohaib
    Jilani, Atif Aftab Ahmed
    Khan, Muhammad Uzair
    SEARCH-BASED SOFTWARE ENGINEERING, SSBSE 2019, 2019, 11664 : 105 - 120
  • [27] RANDOM-SEARCH ALGORITHMS WITH LINEAR CONSTRAINTS.
    Zak, Yu.A.
    1600, (07):
  • [28] Specifying and validating structural constraints of analysis class models using OCL
    Chae, Heung Seok
    Yeom, Keunhyuk
    Kim, Tae Yeon
    INFORMATION AND SOFTWARE TECHNOLOGY, 2008, 50 (05) : 436 - 448
  • [29] Using global constraints for local search
    Nareyek, A
    CONSTRAINT-BASED AGENTS, 2001, 2062 : 25 - 46
  • [30] Safe reuse in modelling language engineering using model subtyping with OCL constraints
    Artur Boronat
    Software and Systems Modeling, 2023, 22 : 797 - 818