A dynamic stochastic model for automatic grammar-based test generation

被引:5
|
作者
Guo, Hai-Feng [1 ]
Qiu, Zongyan [2 ]
机构
[1] Univ Nebraska, Dept Comp Sci, Omaha, NE 68182 USA
[2] Peking Univ, Dept Informat, Beijing 100871, Peoples R China
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2015年 / 45卷 / 11期
关键词
grammar-based test generation; software testing; fault localization; STRATEGY;
D O I
10.1002/spe.2278
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Grammar-based test generation provides a systematic approach to producing test cases from a given context-free grammar. Unfortunately, naive grammar-based test generation is problematic because of the fact that exhaustive random test case production is often explosive, and grammar-based test generation with explicit annotation controls often causes unbalanced testing coverage. In this paper, we present an automatic grammar-based test generation approach, which takes a symbolic grammar as input, requires zero control input from users, and produces well-distributed test cases. Our approach utilizes a novel dynamic stochastic model where each variable is associated with a tuple of probability distributions, which are dynamically adjusted along the derivation. We further present a coverage tree illustrating the distribution of generated test cases and their detailed derivations. More importantly, the coverage tree supports various implicit derivation control mechanisms. We implemented this approach in a Java-based system, named Gena. Each test case generated by Gena automatically comes with a set of structural features, which can play an important and effective role on automated failure causes localization. Experimental results demonstrate the effectiveness of our approach, the well-balanced distribution of generated test cases over grammatical structures, and a case study on grammar-based failure causes localization. Copyright (C) 2014 John Wiley & Sons, Ltd.
引用
收藏
页码:1519 / 1547
页数:29
相关论文
共 50 条
  • [31] Grammar-based Encoding of Facades
    Haegler, Simon
    Wonka, Peter
    Arisona, Stefan Mueller
    Van Gool, Luc
    Mueller, Pascal
    [J]. COMPUTER GRAPHICS FORUM, 2010, 29 (04) : 1479 - 1487
  • [32] Grammar-Based Evolution of Polyominoes
    Megane, Jessica
    Medvet, Eric
    Lourenco, Nuno
    Machado, Penousal
    [J]. GENETIC PROGRAMMING, EUROGP 2024, 2024, 14631 : 56 - 72
  • [33] Grammar-Based Tree Compression
    Lohrey, Markus
    [J]. DEVELOPMENTS IN LANGUAGE THEORY (DLT 2015), 2015, 9168 : 46 - 57
  • [34] Grammar-based immune programming
    Bernardino, Heder S.
    Barbosa, Helio J. C.
    [J]. NATURAL COMPUTING, 2011, 10 (01) : 209 - 241
  • [35] Grammar-based whitebox fuzzing
    Godefroid, Patrice
    Kiezun, Adam
    Levin, Michael Y.
    [J]. ACM SIGPLAN NOTICES, 2008, 43 (06) : 206 - 215
  • [36] Grammar-based Whitebox Fuzzing
    Godefroid, Patrice
    Kiezun, Adam
    Levin, Michael Y.
    [J]. PLDI'08: PROCEEDINGS OF THE 2008 SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN & IMPLEMENTATION, 2008, : 206 - +
  • [37] Grammar-based graph compression
    Maneth, Sebastian
    Peternek, Fabian
    [J]. INFORMATION SYSTEMS, 2018, 76 : 19 - 45
  • [38] Grammar-based immune programming
    Heder S. Bernardino
    Helio J. C. Barbosa
    [J]. Natural Computing, 2011, 10 : 209 - 241
  • [39] Grammar-based whitebox fuzzing
    Microsoft Research, Redmond, WA, United States
    不详
    不详
    [J]. ACM SIGPLAN Not., 6 (206-215):
  • [40] Selected Challenges in Grammar-Based Text Generation from the Semantic Web
    Mille, Simon
    [J]. ARTIFICIAL INTELLIGENCE, 2019, 11866 : 85 - 95