{"title":"Output Type Guided Random Test Case Generation for String Validation Routines","authors":"Chenhui Cui;Rubing Huang;Jinfu Chen;Yunan Zhou","doi":"10.26599/TST.2024.9010023","DOIUrl":null,"url":null,"abstract":"String validation routines have been widely used in many real-world applications, such as email validation and postcode validation. String test cases are adopted to test these validation routines, to identify potential defects and security risks. Random Testing (RT) is a well-known testing approach to randomly generate string test cases from the input domain (i.e., the set of all possible test inputs), which is simple to implement at a low cost. However, its testing effectiveness may be unsatisfactory for string validation routines. The main reason for this is that RT may have a high probability to generate invalid rather than valid string test cases, due to its randomness property. This research proposes a new RT approach based on the output types (i.e., valid and invalid strings) for string validation routines, namely Output-type-guided Random Testing (RT-O), which attempts to randomly generate both valid and invalid string test cases with a certain probability. This research performed an empirical study involving several real-world string validation routines collected from ten Java open-source projects, to investigate and compare testing performances of RT-O against the previous two widely-used RT methods. The results show that the generated string test cases by RT-O outperform test cases generated by other RT methods.","PeriodicalId":48690,"journal":{"name":"Tsinghua Science and Technology","volume":"30 6","pages":"2467-2486"},"PeriodicalIF":3.5000,"publicationDate":"2025-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11072066","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Tsinghua Science and Technology","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11072066/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"Multidisciplinary","Score":null,"Total":0}
引用次数: 0
Abstract
String validation routines have been widely used in many real-world applications, such as email validation and postcode validation. String test cases are adopted to test these validation routines, to identify potential defects and security risks. Random Testing (RT) is a well-known testing approach to randomly generate string test cases from the input domain (i.e., the set of all possible test inputs), which is simple to implement at a low cost. However, its testing effectiveness may be unsatisfactory for string validation routines. The main reason for this is that RT may have a high probability to generate invalid rather than valid string test cases, due to its randomness property. This research proposes a new RT approach based on the output types (i.e., valid and invalid strings) for string validation routines, namely Output-type-guided Random Testing (RT-O), which attempts to randomly generate both valid and invalid string test cases with a certain probability. This research performed an empirical study involving several real-world string validation routines collected from ten Java open-source projects, to investigate and compare testing performances of RT-O against the previous two widely-used RT methods. The results show that the generated string test cases by RT-O outperform test cases generated by other RT methods.
期刊介绍:
Tsinghua Science and Technology (Tsinghua Sci Technol) started publication in 1996. It is an international academic journal sponsored by Tsinghua University and is published bimonthly. This journal aims at presenting the up-to-date scientific achievements in computer science, electronic engineering, and other IT fields. Contributions all over the world are welcome.