An Approach to Automatic Test Case Generation for Unit Testing

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In the paper, we propose a method to automatically generate test cases for the program with nested loops. Our approach first constructs the layer model of the program by scanning procedure source code. Then, through the method of model refinement, the layer model is converted to the extended regular expression model. Next, we can get a set of test paths from the extended regular expression model according to algebraic operations and constraint conditions in the program. Finally, test cases of the program are constructed by using logical operations for these test paths. Compared with those traditional graph-based test case generation methods, our method can produce a set of executable test cases to satisfy a given test coverage criterion without having to build the control flow diagram of the program in unit testing. In addition, our method can also effectively avoid the state space explosion problem.

Original languageEnglish
Title of host publicationProceedings - 2018 IEEE 18th International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages545-552
Number of pages8
ISBN (Print)9781538678398
DOIs
StatePublished - 9 Aug 2018
Event18th IEEE International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018 - Lisbon, Portugal
Duration: 16 Jul 201820 Jul 2018

Publication series

NameProceedings - 2018 IEEE 18th International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018

Conference

Conference18th IEEE International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018
Country/TerritoryPortugal
CityLisbon
Period16/07/1820/07/18

Keywords

  • Extended regular expression
  • Test case generation
  • Test constraint
  • The layer model
  • Unit testing

Fingerprint

Dive into the research topics of 'An Approach to Automatic Test Case Generation for Unit Testing'. Together they form a unique fingerprint.

Cite this