ASE2022

Automatically Tagging the "AAA" Pattern in Unit Test Cases Using Machine Learning Models

Chenhao Wei, Lu Xiao, Tingting Yu, Xinyu Chen, Xiao Wang, Sunny Wong, Abigail Clune

被引用 6 次

摘要

The AAA pattern, i.e. the Arrangement, Action, and Assertion, is a common and nature layout to create a test case. Following this pattern in test cases may benefit comprehension, debugging, and maintenance. The AAA structure of real-life test cases may not be explicit due to its high complexity. Manually labeling AAA statements in test cases is tedious. Thus, an automated approach for labeling AAA statements in existing test cases could benefit new developers and projects that practice collective code ownership and test driven development.