Test case generation, selection and coverage from natural language

被引:6
|
作者
Nogueira, Sidney [1 ]
Araujob, Hugo [2 ,3 ]
Araujo, Renata [2 ]
Iyoda, Juliano [2 ]
Sampaio, Augusto [2 ]
机构
[1] Univ Fed Rural Pernambuco, Dept Comp, Recife, PE, Brazil
[2] Univ Fed Pernambuco, Ctr Informat, Recife, PE, Brazil
[3] Motorola Ind Ltda, Mobile Devices R&D, Sao Paulo, Brazil
关键词
Test generation; Natural language; Use case models; REQUIREMENTS;
D O I
10.1016/j.scico.2019.01.003
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In Model-based Testing (MBT), test cases are automatically generated from a formal model of the system. A disadvantage of MBT is that developers must deal with formal notations. This limitation is addressed in this paper, where use cases are used to model the system. In previous work, we have proposed an automatic strategy for generating test cases from use cases written in a Controlled Natural Language (CNL), which is an English textual notation with a well-defined grammar. Due to its precise syntax, it can be processed and translated into a formal representation for the purpose of automatic test case generation. This paper extends our previous work by proposing a state-based CNL for describing use case control flows enriched with state and data operations. We translate state-based use case descriptions into CSP processes from which test cases can be automatically generated. In addition, we show how a similar notation can be used to specify test selection via the definition of state-based test purposes, which are also translated into CSP processes. Test generation and selection are mechanised by refinement checking using the CSP tool FDR. Despite the fact that we work at a purely process algebraic level to define a test generation strategy, we are able to address model coverage criteria. Particularly, by using FDR, it is possible to have access to the underlying LTS models; we then implemented algorithms for covering events or transitions, possibly combined with selection using test purposes. We also discuss several ways of improving the efficiency of the test generation strategy. As far as we are aware, this integration between an algebraic approach to test case generation with an operational approach for coverage criteria is an original and promising insight. All steps of the strategy are integrated into a tool that provides a GUI for authoring use cases and test purposes described in the proposed CNL, so the formal CSP notation is completely hidden from the test designer. We illustrate our tool and techniques with a running example and a more elaborate case study taken from an industrial setting. (C) 2019 Elsevier B.V. All rights reserved.
引用
收藏
页码:84 / 110
页数:27
相关论文
共 50 条
  • [1] Automated Test Case Generation from Input Specification in Natural Language
    Li, Tianyu
    Lu, Xiuwen
    Xu, Hui
    2022 IEEE INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING WORKSHOPS (ISSREW 2022), 2022, : 258 - 261
  • [2] Executable Test Case Generation from Specifications Written in Natural Language and Test Execution Environment
    Aoyama, Yusuke
    Kuroiwa, Takeru
    Kushiro, Noriyuki
    2021 IEEE 18TH ANNUAL CONSUMER COMMUNICATIONS & NETWORKING CONFERENCE (CCNC), 2021,
  • [3] Test Case Generation Algorithms and Tools for Specifications in Natural Language
    Aoyama, Yusuke
    Kuroiwa, Takeru
    Kushiro, Noriyuki
    2020 IEEE INTERNATIONAL CONFERENCE ON CONSUMER ELECTRONICS (ICCE), 2020, : 629 - 634
  • [4] Adaptive Test Case Allocation, Selection and Generation Using Coverage Spectrum and Operational Profile
    Bertolino, Antonia
    Miranda, Breno
    Pietrantuono, Roberto
    Russo, Stefano
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (05) : 881 - 898
  • [5] Automated Coverage Calculation and Test Case Generation
    Morrison, G. C.
    Inggs, C. P.
    Visser, W. C.
    PROCEEDINGS OF THE SOUTH AFRICAN INSTITUTE FOR COMPUTER SCIENTISTS AND INFORMATION TECHNOLOGISTS CONFERENCE, 2012, : 84 - 93
  • [6] On the Danger of Coverage Directed Test Case Generation
    Staats, Matt
    Gay, Gregory
    Whalen, Michael
    Heimdahl, Mats
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, FASE 2012, 2012, 7212 : 409 - 424
  • [7] CPN simulation-based test case generation from controlled natural-language requirements
    Silva, Bruno Cesar E.
    Carvalho, Gustavo
    Sampaio, Augusto
    SCIENCE OF COMPUTER PROGRAMMING, 2019, 181 : 111 - 139
  • [8] Automatedjournalism in practice: the use of natural language generation for electoral coverage
    da Silveira, Stefanie Carlan
    Nunes, Celeste
    CHASQUI-REVISTA LATINOAMERICANA DE COMUNICACION, 2024, (154): : 193 - 210
  • [9] NAT2TESTSCR: Test case generation from natural language requirements based on SCR specifications
    Carvalho, Gustavo
    Falcao, Diogo
    Barros, Flavia
    Sampaio, Augusto
    Mota, Alexandre
    Motta, Leonardo
    Blackburn, Mark
    SCIENCE OF COMPUTER PROGRAMMING, 2014, 95 : 275 - 297
  • [10] AUTOMATED TEST-CASE SELECTION BASED ON TEST COVERAGE METRICS
    MCALLISTER, M
    VUONG, ST
    ALILOVICCURGUS, J
    PROTOCOL TEST SYSTEMS, V, 1993, 11 : 93 - 104