arrow
返回

Dynamic Human-in-the-Loop Assertion Generation

delete2023-04-01
delete2
PRE
AI
L
Lucas Zamprogno
B
Braxton Hall
R
Reid Holmes *
J
Joanne M. Atlee
DOI:10.1109/TSE.2022.3217544delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Test cases use assertions to check program behaviour. While these assertions may not be complex, they are themselves code that must be written correctly in order to determine whether a test case should pass or fail. We claim that most test assertions are relatively repetitive and straight-forward, making their construction well suited to automation and that this automation can reduce developer effort while improving assertion quality. Examining 33,873 assertions from 105 projects revealed that developer-written assertions fall into twelve high-level categories, confirming that the vast majority (>90%) of test assertions are fairly simple in practice. We created AutoAssert, a human-in-the-loop tool to fit naturally into a developer's test-writing workflow by automatically generating assertions for JavaScript and TypeScript test cases. A developer invokes AutoAssert by identifying the variable they want validated; AutoAssert uses dynamic analysis to generate assertions relevant for this variable and its runtime values, injecting the assertions into the test case for the developer to accept, modify, delete. Comparing AutoAssert's assertions to those written by developers, we found that the assertions generated by AutoAssert are the same kind of assertion as was written by developers 84% of the time in a sample of over 1,000 assertions. Additionally we validated the utility of AutoAssert-generated assertions with 17 developers who found the majority of generated assertions to be useful and expressed considerable interest in using such a tool for their own projects.
Keyword:
Complexity theory
Codes
Semantics
Human in the loop
Testing
Runtime
Libraries

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.8K
被引数:
1.1W

机构

U
University of Waterloo
学者数:
2.2W
论文数: 2.3W
被引数: 3.3W
U
University of British Columbia
学者数:
7.0W
论文数: 6.1W
被引数: 8.6W
引用论文

引用论文

Performance analysis of a mechanical vapor recompression zero-emission system with water-injected compressor
err2018-10-01
err0
errOAAI
errHanzhi Wang; Shuaiqi Li; Chong Huang; Shihui He; Wenji Song; Ziping Feng
err分享
err收藏
Model-based asessment of an in-vivo predictive relationship from CA1 to CA3 in the rodent hippocampus
err2014-09-27
err0
errOAAI
errRoman A. Sandler; Dong Song; Robert E. Hampson; Sam A. Deadwyler; Theodore W. Berger; Vasilis Z. Marmarelis
err分享
err收藏
Metallo-Organic Decomposition (MOD) Films for Electronic Packaging
err2011-02-25
err0
PREAI
errGeraldine M. Vest; V. P. Cone; C. J. Herzfeld; A. K. Bhansali
err分享
err收藏
Risk factors associated with disease progression and mortality in chronic kidney disease of uncertain etiology: a cohort study in Medawachchiya, Sri Lanka
err2011-09-01
err0
errOAAI
errLalantha Senevirathna; Tilak Abeysekera; Shanika Nanayakkara; Rohana Chandrajith; Neelakanthi Ratnatunga; Kouji H. Harada; Toshiaki Hitomi; Toshiyuki Komiya; Eri Muso; Akio Koizumi
err分享
err收藏
Accuracy of Self-Reported Weight Collected Through a Web-Based Platform in a Weight Loss Trial: Validation Study of the POEmaS Clinical Trial
err2019-01-01
err0
PREAI
errBeleigoli Alline M.; Andrade Andre Q.; de Fátima H. Diniz Maria; Alvares Roberta S.; Ferreira Marina H.; Silva Leticia A.; Rodrigues Marcia C.; Jacomassi Luma; Cerqueira Amanda G.; Ribeiro Antonio L.
err分享
err收藏
Sources of software development task friction
err2022-09-20
err1
PREAI
errBradley, Nick C.; Fritz, Thomas; Holmes, Reid
err分享
err收藏
Regression testing in an industrial environment
err1998-05-01
err96
errOAAI
errOnoma, AK; Tsai, WT; Poonawala, MH; Suganuma, H
err分享
err收藏
学者 查看更多内容