{"id":"https://openalex.org/W7128276797","doi":"https://doi.org/10.1145/3745765","title":"Automated Unit Test Generation via Chain-of-Thought Prompt and Reinforcement Learning from Coverage Feedback","display_name":"Automated Unit Test Generation via Chain-of-Thought Prompt and Reinforcement Learning from Coverage Feedback","publication_year":2025,"publication_date":"2025-07-08","ids":{"openalex":"https://openalex.org/W7128276797","doi":"https://doi.org/10.1145/3745765"},"language":"en","primary_location":{"id":"doi:10.1145/3745765","is_oa":false,"landing_page_url":"https://doi.org/10.1145/3745765","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},"type":"article","indexed_in":["crossref"],"open_access":{"is_oa":false,"oa_status":"closed","oa_url":null,"any_repository_has_fulltext":false},"authorships":[{"author_position":"first","author":{"id":"https://openalex.org/A5125287743","display_name":"Junwei Zhang","orcid":null},"institutions":[{"id":"https://openalex.org/I168879160","display_name":"Zhejiang University of Science and Technology","ror":"https://ror.org/05mx0wr29","country_code":"CN","type":"education","lineage":["https://openalex.org/I168879160"]},{"id":"https://openalex.org/I55712492","display_name":"Zhejiang University of Technology","ror":"https://ror.org/02djqfd08","country_code":"CN","type":"education","lineage":["https://openalex.org/I55712492"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Junwei Zhang","raw_affiliation_strings":["The College of Computer Science and Technology, Zhejiang University, Hangzhou,\u00a0China"],"raw_orcid":"https://orcid.org/0000-0003-4323-8951","affiliations":[{"raw_affiliation_string":"The College of Computer Science and Technology, Zhejiang University, Hangzhou,\u00a0China","institution_ids":["https://openalex.org/I168879160","https://openalex.org/I55712492"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5047688641","display_name":"Xing Hu","orcid":"https://orcid.org/0000-0003-0093-3292"},"institutions":[{"id":"https://openalex.org/I76130692","display_name":"Zhejiang University","ror":"https://ror.org/00a2xv884","country_code":"CN","type":"education","lineage":["https://openalex.org/I76130692"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Xing Hu","raw_affiliation_strings":["Zhejiang University, Hangzhou, China"],"raw_orcid":"https://orcid.org/0000-0003-0093-3292","affiliations":[{"raw_affiliation_string":"Zhejiang University, Hangzhou, China","institution_ids":["https://openalex.org/I76130692"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5125315129","display_name":"Xin Xia","orcid":null},"institutions":[{"id":"https://openalex.org/I76130692","display_name":"Zhejiang University","ror":"https://ror.org/00a2xv884","country_code":"CN","type":"education","lineage":["https://openalex.org/I76130692"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Xin Xia","raw_affiliation_strings":["Zhejiang University, Hangzhou, China"],"raw_orcid":"https://orcid.org/0000-0002-6302-3256","affiliations":[{"raw_affiliation_string":"Zhejiang University, Hangzhou, China","institution_ids":["https://openalex.org/I76130692"]}]},{"author_position":"middle","author":{"id":"https://openalex.org/A5034057959","display_name":"Shing-Chi Cheung","orcid":"https://orcid.org/0000-0002-3508-7172"},"institutions":[{"id":"https://openalex.org/I200769079","display_name":"Hong Kong University of Science and Technology","ror":"https://ror.org/00q4vv597","country_code":"HK","type":"education","lineage":["https://openalex.org/I200769079"]}],"countries":["HK"],"is_corresponding":false,"raw_author_name":"Shing-Chi Cheung","raw_affiliation_strings":["The Hong Kong University of Science and Technology, Hong Kong, China"],"raw_orcid":"https://orcid.org/0000-0002-3508-7172","affiliations":[{"raw_affiliation_string":"The Hong Kong University of Science and Technology, Hong Kong, China","institution_ids":["https://openalex.org/I200769079"]}]},{"author_position":"last","author":{"id":"https://openalex.org/A5124058280","display_name":"Shanping Li","orcid":null},"institutions":[{"id":"https://openalex.org/I76130692","display_name":"Zhejiang University","ror":"https://ror.org/00a2xv884","country_code":"CN","type":"education","lineage":["https://openalex.org/I76130692"]}],"countries":["CN"],"is_corresponding":false,"raw_author_name":"Shanping Li","raw_affiliation_strings":["Zhejiang University, Hangzhou, China"],"raw_orcid":"https://orcid.org/0000-0003-2615-9792","affiliations":[{"raw_affiliation_string":"Zhejiang University, Hangzhou, China","institution_ids":["https://openalex.org/I76130692"]}]}],"institutions":[],"countries_distinct_count":2,"institutions_distinct_count":4,"corresponding_author_ids":[],"corresponding_institution_ids":[],"apc_list":null,"apc_paid":null,"fwci":7.0197,"has_fulltext":false,"cited_by_count":7,"citation_normalized_percentile":{"value":0.96869504,"is_in_top_1_percent":false,"is_in_top_10_percent":true},"cited_by_percentile_year":{"min":94,"max":99},"biblio":{"volume":"35","issue":"4","first_page":"1","last_page":"30"},"is_retracted":false,"is_paratext":false,"is_xpac":false,"primary_topic":{"id":"https://openalex.org/T10743","display_name":"Software Testing and Debugging Techniques","score":0.8551999926567078,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},"topics":[{"id":"https://openalex.org/T10743","display_name":"Software Testing and Debugging Techniques","score":0.8551999926567078,"subfield":{"id":"https://openalex.org/subfields/1712","display_name":"Software"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T10260","display_name":"Software Engineering Research","score":0.04780000075697899,"subfield":{"id":"https://openalex.org/subfields/1710","display_name":"Information Systems"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}},{"id":"https://openalex.org/T11689","display_name":"Adversarial Robustness in Machine Learning","score":0.03240000084042549,"subfield":{"id":"https://openalex.org/subfields/1702","display_name":"Artificial Intelligence"},"field":{"id":"https://openalex.org/fields/17","display_name":"Computer Science"},"domain":{"id":"https://openalex.org/domains/3","display_name":"Physical Sciences"}}],"keywords":[{"id":"https://openalex.org/keywords/reinforcement-learning","display_name":"Reinforcement learning","score":0.7677000164985657},{"id":"https://openalex.org/keywords/unit-testing","display_name":"Unit testing","score":0.7462999820709229},{"id":"https://openalex.org/keywords/benchmark","display_name":"Benchmark (surveying)","score":0.6298999786376953},{"id":"https://openalex.org/keywords/code","display_name":"Code (set theory)","score":0.4645000100135803},{"id":"https://openalex.org/keywords/test-case","display_name":"Test case","score":0.45329999923706055},{"id":"https://openalex.org/keywords/test-data","display_name":"Test data","score":0.42820000648498535}],"concepts":[{"id":"https://openalex.org/C41008148","wikidata":"https://www.wikidata.org/wiki/Q21198","display_name":"Computer science","level":0,"score":0.8766999840736389},{"id":"https://openalex.org/C97541855","wikidata":"https://www.wikidata.org/wiki/Q830687","display_name":"Reinforcement learning","level":2,"score":0.7677000164985657},{"id":"https://openalex.org/C148027188","wikidata":"https://www.wikidata.org/wiki/Q907375","display_name":"Unit testing","level":3,"score":0.7462999820709229},{"id":"https://openalex.org/C185798385","wikidata":"https://www.wikidata.org/wiki/Q1161707","display_name":"Benchmark (surveying)","level":2,"score":0.6298999786376953},{"id":"https://openalex.org/C119857082","wikidata":"https://www.wikidata.org/wiki/Q2539","display_name":"Machine learning","level":1,"score":0.5292999744415283},{"id":"https://openalex.org/C154945302","wikidata":"https://www.wikidata.org/wiki/Q11660","display_name":"Artificial intelligence","level":1,"score":0.5189999938011169},{"id":"https://openalex.org/C2776760102","wikidata":"https://www.wikidata.org/wiki/Q5139990","display_name":"Code (set theory)","level":3,"score":0.4645000100135803},{"id":"https://openalex.org/C128942645","wikidata":"https://www.wikidata.org/wiki/Q1568346","display_name":"Test case","level":3,"score":0.45329999923706055},{"id":"https://openalex.org/C16910744","wikidata":"https://www.wikidata.org/wiki/Q7705759","display_name":"Test data","level":2,"score":0.42820000648498535},{"id":"https://openalex.org/C2777267654","wikidata":"https://www.wikidata.org/wiki/Q3519023","display_name":"Test (biology)","level":2,"score":0.41100001335144043},{"id":"https://openalex.org/C53942775","wikidata":"https://www.wikidata.org/wiki/Q1211721","display_name":"Code coverage","level":3,"score":0.40529999136924744},{"id":"https://openalex.org/C124101348","wikidata":"https://www.wikidata.org/wiki/Q172491","display_name":"Data mining","level":1,"score":0.29420000314712524},{"id":"https://openalex.org/C51632099","wikidata":"https://www.wikidata.org/wiki/Q3985153","display_name":"Training set","level":2,"score":0.27300000190734863}],"mesh":[],"locations_count":2,"locations":[{"id":"doi:10.1145/3745765","is_oa":false,"landing_page_url":"https://doi.org/10.1145/3745765","pdf_url":null,"source":{"id":"https://openalex.org/S142627899","display_name":"ACM Transactions on Software Engineering and Methodology","issn_l":"1049-331X","issn":["1049-331X","1557-7392"],"is_oa":false,"is_in_doaj":false,"is_core":true,"host_organization":"https://openalex.org/P4310319798","host_organization_name":"Association for Computing Machinery","host_organization_lineage":["https://openalex.org/P4310319798"],"host_organization_lineage_names":["Association for Computing Machinery"],"type":"journal"},"license":null,"license_id":null,"version":"publishedVersion","is_accepted":true,"is_published":true,"raw_source_name":"ACM Transactions on Software Engineering and Methodology","raw_type":"journal-article"},{"id":"pmh:oai:repository.hkust.edu.hk:1783.1-172067","is_oa":false,"landing_page_url":"http://repository.hkust.edu.hk/ir/Record/1783.1-172067","pdf_url":null,"source":{"id":"https://openalex.org/S4306401796","display_name":"Rare & Special e-Zone (The Hong Kong University of Science and Technology)","issn_l":null,"issn":null,"is_oa":false,"is_in_doaj":false,"is_core":false,"host_organization":"https://openalex.org/I200769079","host_organization_name":"Hong Kong University of Science and Technology","host_organization_lineage":["https://openalex.org/I200769079"],"host_organization_lineage_names":[],"type":"repository"},"license":null,"license_id":null,"version":"submittedVersion","is_accepted":false,"is_published":false,"raw_source_name":null,"raw_type":"Article"}],"best_oa_location":null,"sustainable_development_goals":[{"score":0.4610341191291809,"display_name":"Peace, Justice and strong institutions","id":"https://metadata.un.org/sdg/16"}],"awards":[{"id":"https://openalex.org/G2982775919","display_name":null,"funder_award_id":"2024YFB4506400","funder_id":"https://openalex.org/F4320335777","funder_display_name":"National Key Research and Development Program of China"}],"funders":[{"id":"https://openalex.org/F4320335777","display_name":"National Key Research and Development Program of China","ror":null}],"has_content":{"grobid_xml":false,"pdf":false},"content_urls":null,"referenced_works_count":38,"referenced_works":["https://openalex.org/W1971650562","https://openalex.org/W2026701697","https://openalex.org/W2027422213","https://openalex.org/W2107709519","https://openalex.org/W2109596254","https://openalex.org/W2110908283","https://openalex.org/W2119717200","https://openalex.org/W2133414060","https://openalex.org/W2146178292","https://openalex.org/W2156723666","https://openalex.org/W2682664750","https://openalex.org/W2888078871","https://openalex.org/W2966980041","https://openalex.org/W3005628256","https://openalex.org/W3139053720","https://openalex.org/W3161997752","https://openalex.org/W3176572490","https://openalex.org/W3185341429","https://openalex.org/W4220699888","https://openalex.org/W4282556381","https://openalex.org/W4284681867","https://openalex.org/W4284690374","https://openalex.org/W4301229630","https://openalex.org/W4313547555","https://openalex.org/W4376122390","https://openalex.org/W4376167329","https://openalex.org/W4384304865","https://openalex.org/W4384345664","https://openalex.org/W4384918448","https://openalex.org/W4386185625","https://openalex.org/W4387008033","https://openalex.org/W4394015350","https://openalex.org/W4399557965","https://openalex.org/W4399668074","https://openalex.org/W4400484392","https://openalex.org/W4407806619","https://openalex.org/W6891794089","https://openalex.org/W6939863769"],"related_works":[],"abstract_inverted_index":{"Recently,":[0],"Large":[1],"Language":[2],"Models":[3],"(LLMs)":[4],"have":[5,21,226],"shown":[6],"promising":[7,28],"results":[8,242],"in":[9,74,151,237,249],"code":[10,67,210],"generation,":[11],"and":[12,45,62,96,116,125,173,190,209,231,251],"several":[13],"automated":[14],"test":[15,89,127,232],"generation":[16,90],"approaches":[17,26],"based":[18],"on":[19],"LLMs":[20,86],"been":[22],"proposed.":[23],"Although":[24],"these":[25,71],"achieve":[27],"performance,":[29],"they":[30,36,54],"suffer":[31],"from":[32,203,221],"two":[33,72],"limitations.":[34],"First,":[35],"lack":[37],"the":[38,42,50,56,59,92,110,123,131,148,161,166,170,179,187,196,222,227,238,264,267],"intrinsic":[39],"understanding":[40],"of":[41,58,169],"semantic":[43],"intricacies":[44],"logical":[46],"constructs":[47],"inherent":[48],"to":[49,136,185,199],"focal":[51,111,171,229],"method.":[52],"Second,":[53],"ignore":[55],"diversity":[57],"generated":[60],"tests":[61,64],"generate":[63,191],"with":[65],"limited":[66],"coverage.":[68],"To":[69,212],"alleviate":[70],"limitations,":[73],"this":[75],"work,":[76],"we":[77,102,154,177,217],"propose":[78],"a":[79,105],"novel":[80],"approach":[81,202],"named":[82],"TestCTRL":[83,245,256],"that":[84,143,225,244],"optimizes":[85],"for":[87,266],"unit":[88,114,192],"by":[91,164],"Chain-of-Thought":[93],"(CoT)":[94],"prompt":[95,121],"Reinforcement":[97],"Learning":[98],"(RL)":[99],"strategy.":[100],"Specifically,":[101],"first":[103],"build":[104],"new":[106],"CoT":[107,117,120,132,223],"dataset,":[108],"containing":[109],"methods,":[112],"corresponding":[113],"tests,":[115],"prompts.":[118],"The":[119,240],"includes":[122],"intention":[124],"possible":[126],"input":[128],"values.":[129],"Then,":[130],"dataset":[133,224],"is":[134],"used":[135],"fine-tune":[137,155],"one":[138],"LLM":[139,157],"(i.e.,":[140,158,206],"CodeLlama":[141],"7B)":[142],"can":[144],"be":[145],"seen":[146],"as":[147,160,235],"policy":[149,188],"model":[150,163,189],"RL.":[152],"Meanwhile,":[153],"another":[156],"CodeGPT)":[159],"reward":[162],"predicting":[165],"line":[167,250],"coverage":[168],"method":[172,230],"its":[174],"test.":[175],"Moreover,":[176],"employ":[178],"Proximal":[180],"Policy":[181],"Optimization":[182],"(PPO)":[183],"algorithm":[184],"optimize":[186],"tests.":[193],"We":[194,261],"use":[195],"Defects4J":[197],"benchmark":[198],"evaluate":[200],"our":[201],"three":[204],"perspectives":[205],"naturalness,":[207],"validity,":[208],"coverage).":[211],"avoid":[213],"data":[214,220],"leakage":[215],"threats,":[216],"filtered":[218],"out":[219],"same":[228],"case":[233],"names":[234],"those":[236],"Defects4J.":[239],"experimental":[241],"demonstrate":[243],"outperforms":[246],"state-of-the-art":[247],"baselines":[248],"branch":[252],"coverages,":[253],"respectively.":[254],"Besides,":[255],"improves":[257],"bug":[258],"detection":[259],"performance.":[260],"also":[262],"investigate":[263],"reason":[265],"proposed":[268],"approach\u2019s":[269],"superiority.":[270]},"counts_by_year":[{"year":2026,"cited_by_count":5},{"year":2025,"cited_by_count":2}],"updated_date":"2026-08-28T12:50:07.497085","created_date":"2026-02-08T00:00:00"}
