期刊文献+

基于Happens-before关系的Android应用并发不稳定测试检测

Concurrent Flaky Test Detection Based on Happens-before Relationship for Android Applications
在线阅读 下载PDF
导出
摘要 Android应用异步消息执行顺序的不确定性是导致其不稳定的主要原因.现有不稳定测试研究大多通过随机确定异步消息的执行顺序以触发不稳定测试,其检测效果不佳且效率较低.本文提出一种基于happens-before(HB)关系的Android应用并发不稳定测试检测方法,通过分析Android应用测试用例执行轨迹中异步消息间的HB关系,进而确定异步消息的可执行区间;并设计最大差异化调度策略,有指导性地确定异步消息执行顺序,使调度后的测试执行轨迹上异步消息执行序与原测试执行轨迹差异最大化,进而尝试改变测试执行结果,检测测试的不稳定性.为验证本文方法的有效性,针对40个Android应用程序的50个不稳定测试用例进行实验,实验结果表明,本文方法可检测全部不稳定测试用例,相比于当前主流工具检测效果提升6%,且平均检测时间缩短31.78%. The uncertain execution order of asynchronous messages in Android applications is the main reason for their flakiness.Most existing flaky test studies trigger instability testing by randomly determining the execution order of asynchronous messages,which is ineffective and inefficient.This study proposes a concurrent flaky test detection based on the happens-before(HB)relationship for Android applications.After analyzing the HB relationship between asynchronous messages in the execution trace of Android application test cases,the proposed method determines the asynchronous message workscope.Then,it designs a scheduling strategy with maximum differentiation to determine the asynchronous message execution order under guidance to maximize the difference between the asynchronous message execution order and the original test execution trace on the test execution trace after scheduling.Then,the method tries to change test execution results to detect flakiness in the test.For effectiveness verification of the method,experiments are conducted on 50 test cases of 40 Android applications,and the experimental results show that the method can detect all the flaky tests,improving the detection effect by 6%and shortening the average detection time by 31.78%compared with the current state-of-the-art techniques.
作者 张雨 张文天 张未晞 尚颖 ZHANG Yu;ZHANG Wen-Tian;ZHANG Wei-Xi;SHANG Ying(School of Information,Changchun Polytechnic,Changchun 130033,China;College Information Science and Technology,Beijing University of Chemical Technology,Beijing 100029,China)
出处 《计算机系统应用》 2025年第2期102-110,共9页 Computer Systems & Applications
基金 国家自然科学基金(62077003)。
关键词 ANDROID应用 不稳定测试检测 异步消息 HB关系 差异化调度 Android application flaky test detection asynchronous message happens-before(HB)relationship differentiated scheduling
  • 相关文献

参考文献1

共引文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部