From Open Source to Industry: A Replication Study of AAA Test Structure in Envestnet

IF 6 1区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
IEEE Transactions on Software Engineering Pub Date : 2026-10-01 Epub Date: 2026-07-07 DOI:10.1109/TSE.2026.3710992
Chenhao Wei;Sunny Wong;Lu Xiao
{"title":"From Open Source to Industry: A Replication Study of AAA Test Structure in Envestnet","authors":"Chenhao Wei;Sunny Wong;Lu Xiao","doi":"10.1109/TSE.2026.3710992","DOIUrl":null,"url":null,"abstract":"The Arrange-Act-Assert (AAA) pattern, a unified structure for organizing unit tests, is widely recognized for better comprehension and maintenance of tests. However, its adoption in commercial software development remains insufficiently understood. This study investigates how the AAA pattern is practiced in industrial settings by examining test cases from Envestnet Inc. (ENV), adapting automated AAA tagging techniques, and comparing AAA-related issues between commercial and open-source software (OSS) projects. We enhanced a machine learning-based AAA tagging model, previously applied to OSS, to suit ENV domain-specific codebases. We then analyzed AAA adherence and issue distribution across three ENV projects, followed by developer interviews to uncover root causes and assess refactoring strategies. The adapted tagging model achieved F1 scores of 0.75, 0.77, and 0.73 for Arrangement, Action, and Assertion, respectively. Compared with seven open-source projects (25.17%), ENV projects exhibited a significantly lower prevalence of AAA issues (15.68%, <inline-formula><tex-math>$\\boldsymbol{p}\\,\\mathbf{=\\,0.034}$</tex-math></inline-formula>, Cohen’s <inline-formula><tex-math>$\\boldsymbol{d}\\,\\mathbf{=\\,1.64}$</tex-math></inline-formula>). Interviews with developers further illuminated the underlying causes of these violations—such as production–test co-evolution and unfamiliarity with certain testing APIs—and highlighted nuanced refactoring strategies that carefully balance structural consistency, code clarity, and test performance. These nuances, however, did not emerge in our earlier investigations of open-source projects. This study demonstrates that incorporating domain-specific data to fine-tune pre-trained models like CodeBERT, alongside context-aware features, enables accurate AAA analysis. ENV projects have significantly fewer AAA issues than OSS, with distinct patterns such as the absence of Multiple Acts and the prevalence of Assert Precondition. Developer interviews reveal practical motivations behind AAA deviations and inform context-sensitive refactoring strategies. These findings provide actionable guidance for improving test structure and developing automated refactoring tools in practice.","PeriodicalId":13324,"journal":{"name":"IEEE Transactions on Software Engineering","volume":"52 10","pages":"3214-3234"},"PeriodicalIF":6.0000,"publicationDate":"2026-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Transactions on Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/11596584/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/7/7 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

The Arrange-Act-Assert (AAA) pattern, a unified structure for organizing unit tests, is widely recognized for better comprehension and maintenance of tests. However, its adoption in commercial software development remains insufficiently understood. This study investigates how the AAA pattern is practiced in industrial settings by examining test cases from Envestnet Inc. (ENV), adapting automated AAA tagging techniques, and comparing AAA-related issues between commercial and open-source software (OSS) projects. We enhanced a machine learning-based AAA tagging model, previously applied to OSS, to suit ENV domain-specific codebases. We then analyzed AAA adherence and issue distribution across three ENV projects, followed by developer interviews to uncover root causes and assess refactoring strategies. The adapted tagging model achieved F1 scores of 0.75, 0.77, and 0.73 for Arrangement, Action, and Assertion, respectively. Compared with seven open-source projects (25.17%), ENV projects exhibited a significantly lower prevalence of AAA issues (15.68%, $\boldsymbol{p}\,\mathbf{=\,0.034}$, Cohen’s $\boldsymbol{d}\,\mathbf{=\,1.64}$). Interviews with developers further illuminated the underlying causes of these violations—such as production–test co-evolution and unfamiliarity with certain testing APIs—and highlighted nuanced refactoring strategies that carefully balance structural consistency, code clarity, and test performance. These nuances, however, did not emerge in our earlier investigations of open-source projects. This study demonstrates that incorporating domain-specific data to fine-tune pre-trained models like CodeBERT, alongside context-aware features, enables accurate AAA analysis. ENV projects have significantly fewer AAA issues than OSS, with distinct patterns such as the absence of Multiple Acts and the prevalence of Assert Precondition. Developer interviews reveal practical motivations behind AAA deviations and inform context-sensitive refactoring strategies. These findings provide actionable guidance for improving test structure and developing automated refactoring tools in practice.
从开源到工业:Envestnet中AAA测试结构的复制研究
安排-行为-断言(AAA)模式是一种用于组织单元测试的统一结构,它被广泛认为可以更好地理解和维护测试。然而,它在商业软件开发中的应用仍然没有得到充分的理解。本研究通过检查Envestnet Inc. (ENV)的测试用例,采用自动AAA标记技术,并比较商业和开源软件(OSS)项目之间与AAA相关的问题,来调查AAA模式是如何在工业环境中实践的。我们增强了以前应用于OSS的基于机器学习的AAA标记模型,以适应ENV领域特定的代码库。然后,我们分析了三个ENV项目的AAA依从性和问题分布,随后进行了开发人员访谈,以发现根本原因并评估重构策略。调整后的标记模型在“安排”、“行动”和“断言”上的F1得分分别为0.75、0.77和0.73。与7个开源项目(25.17%)相比,ENV项目的AAA问题发生率显著降低(15.68%,$\boldsymbol{p}\,\mathbf{=\,0.034}$, Cohen 's $\boldsymbol{d}\,\mathbf{=\,1.64}$)。对开发人员的采访进一步阐明了这些违规的潜在原因——比如生产-测试协同进化和对某些测试api的不熟悉——并强调了细致的重构策略,这些策略可以仔细地平衡结构一致性、代码清晰度和测试性能。然而,这些细微差别并没有出现在我们早期对开源项目的调查中。这项研究表明,结合特定领域的数据来微调预训练模型,如CodeBERT,以及上下文感知功能,可以实现准确的AAA分析。ENV项目的AAA问题明显少于OSS,具有不同的模式,例如缺乏多重行为和断言前提条件的流行。开发人员访谈揭示了AAA偏差背后的实际动机,并告知了上下文敏感的重构策略。这些发现为在实践中改进测试结构和开发自动化重构工具提供了可操作的指导。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IEEE Transactions on Software Engineering
IEEE Transactions on Software Engineering 工程技术-工程:电子与电气
CiteScore
9.70
自引率
10.80%
发文量
724
审稿时长
6 months
期刊介绍: IEEE Transactions on Software Engineering seeks contributions comprising well-defined theoretical results and empirical studies with potential impacts on software construction, analysis, or management. The scope of this Transactions extends from fundamental mechanisms to the development of principles and their application in specific environments. Specific topic areas include: a) Development and maintenance methods and models: Techniques and principles for specifying, designing, and implementing software systems, encompassing notations and process models. b) Assessment methods: Software tests, validation, reliability models, test and diagnosis procedures, software redundancy, design for error control, and measurements and evaluation of process and product aspects. c) Software project management: Productivity factors, cost models, schedule and organizational issues, and standards. d) Tools and environments: Specific tools, integrated tool environments, associated architectures, databases, and parallel and distributed processing issues. e) System issues: Hardware-software trade-offs. f) State-of-the-art surveys: Syntheses and comprehensive reviews of the historical development within specific areas of interest.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书