Towards Automatic and Flexible Unit Test Generation for Legacy HPC Code

被引:0
|
作者
Hovy, Christian [1 ]
Kunkel, Julian [2 ]
机构
[1] Univ Hamburg, Dept Informat, Hamburg, Germany
[2] Deutsch Klimarechenzentrum GmbH, Hamburg, Germany
关键词
D O I
10.1109/SE-HPCCSE.2016.6
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Unit testing is an established practice in professional software development. However, in high-performance computing (HPC) with its scientific applications, it is not widely applied. Besides general problems regarding testing of scientific software, for many HPC applications the effort of creating small test cases with a consistent set of test data is high. We have created a tool called FortranTestGenerator, that significantly reduces the effort of creating unit tests for subroutines of an existing Fortran application. It is based on Capture & Replay (C&R), that is, it extracts data while running the original application and uses the extracted data as test input data. The tool automatically generates code for capturing the input data and a basic test driver which can be extended by the developer to an appropriate unit test. A static source code analysis is conducted, to reduce the number of captured variables. Code is generated based on flexibly customizable templates. Thus, both the capturing process and the unit tests can easily be integrated into an existing software ecosystem. Since most HPC applications use message passing for parallel processing, we also present an approach to extend our C&R model to MPI communication. This allows extraction of unit tests from massively parallel applications that can be run with a single process.
引用
收藏
页码:1 / 8
页数:8
相关论文
共 50 条
  • [41] Toward granular search-based automatic unit test case generation
    Pecorelli, Fabiano
    Grano, Giovanni
    Palomba, Fabio
    Gall, Harald C.
    De Lucia, Andrea
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (04)
  • [42] Automatic Unit Test Generation for Machine Learning Libraries: How Far Are We?
    Wang, Song
    Shrestha, Nishtha
    Subburaman, Abarna Kucheri
    Wang, Junjie
    Wei, Moshi
    Nagappan, Nachiappan
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2021), 2021, : 1548 - 1560
  • [43] Automatic Test Data Generation for Unit Testing to Achieve MC/DC Criterion
    Wu, Tianyong
    Yan, Jun
    Zhang, Jian
    2014 EIGHTH INTERNATIONAL CONFERENCE ON SOFTWARE SECURITY AND RELIABILITY, 2014, : 118 - 126
  • [44] Automatic code generation: A practical approach
    Papadopoulos, George A.
    PROCEEDINGS OF THE ITI 2008 30TH INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY INTERFACES, 2008, : 861 - 866
  • [45] Some thoughts on automatic code generation
    Glass, RL
    DATA BASE FOR ADVANCES IN INFORMATION SYSTEMS, 1996, 27 (02): : 16 - 18
  • [46] Automatic Selenium Code Generation for Testing
    Rathi, Nikhil
    Srivathsav, Rohith
    Chitlangia, Rishabh
    Pachghare, V. K.
    INTELLIGENT COMPUTING, INFORMATION AND CONTROL SYSTEMS, ICICCS 2019, 2020, 1039 : 194 - 200
  • [47] A Selenium based Approach to Automatic Test Script Generation for Refactoring Java']JavaScript Code
    Chen, Ruifeng
    Miao, Huaikou
    2013 IEEE/ACIS 12TH INTERNATIONAL CONFERENCE ON COMPUTER AND INFORMATION SCIENCE (ICIS), 2013, : 341 - 346
  • [48] Techniques and Tools for the Automatic Generation of Optimal Test Data at Code, Model and Interface Level
    Pinte, Florin
    Oster, Norbert
    Saglietti, Francesca
    ICSE'08 PROCEEDINGS OF THE THIRTIETH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 2008, : 927 - 928
  • [49] Automatic source code generation for microcontrollers
    Rozehnal, Z
    PROGRAMMABLE DEVICES AND SYSTEMS, 2000, : 195 - 197
  • [50] Some thoughts on automatic code generation
    Glass, RL
    JOURNAL OF SYSTEMS AND SOFTWARE, 1997, 37 (01) : 1 - 3