

浏览全部资源
扫码关注微信
1.北京信息科技大学计算机学院,北京 100192
2.河南工业大学信息科学与工程学院,河南郑州 450001
Received:31 December 2025,
Accepted:13 January 2026,
Published:25 January 2026
移动端阅览
张亚东, 崔展齐, 兰文尉, 等. 基于大语言模型的Web文本输入组件测试方法[J]. 电子学报, 2026, 54(01): 276-290.
ZHANG Yadong, CUI Zhanqi, LAN Wenwei, et al. Testing Text Input Components of Web Applications Based on Large Language Models[J]. Acta Electronica Sinica, 2026, 54(01): 276-290.
张亚东, 崔展齐, 兰文尉, 等. 基于大语言模型的Web文本输入组件测试方法[J]. 电子学报, 2026, 54(01): 276-290. DOI:10.12263/DZXB.20250880
ZHANG Yadong, CUI Zhanqi, LAN Wenwei, et al. Testing Text Input Components of Web Applications Based on Large Language Models[J]. Acta Electronica Sinica, 2026, 54(01): 276-290. DOI:10.12263/DZXB.20250880
文本输入组件是Web应用实现交互功能的重要组成部分,广泛应用于搜索查询、内容创作等操作场景,其输入内容通常受到语法和复杂业务规则的约束。若文本输入组件未能正确处理恶意或非预期的文本输入,可能导致应用崩溃。现有的Web图形用户界面(Graphical User Interface,GUI)测试工具未能充分考虑文本输入组件的约束关系,无法生成具有针对性的文本输入来检测应用中文本输入组件的错误。此外,现有方法通常忽略了多个文本输入组件之间还可能存在复杂的约束关系,难以生成多样化的文本输入组合。为此,本文提出了一种基于大语言模型(Large Language Models,LLMs)的Web应用文本输入组件测试方法LTICT(LLM-based Text Input Component Testing)。首先,LTICT从被测应用的HTML文件中提取文本输入组件的信息,以供LLM推断文本输入组件的约束关系,并据此引导LLM合成程序;然后,LTICT执行该程序来批量生成文本输入,以对文本输入组件进行测试;最后,LTICT将收集所测试文本输入组件的上下文信息和所生成测试数据的执行结果,反馈给LLM以帮助其分析多个文本输入组件间的约束关系,从而生成更多样化的文本输入组合。在4个开源Web应用上进行的实验结果表明,相比于广泛使用的自动化测试工具WebExplor、DBInputs、QTypist,LTICT检测文本输入组件错误的数量分别提升了34.21%、37.84%和8.51%。在检测文本输入组件错误的平均用时方面,LTICT比WebExplor、DBInputs、QTypist分别减少了10.69%、11.87%和6.99%。
Text input components are essential to Web applications and are widely used in scenarios such as search queries and content creation. Their inputs are typically constrained by syntactic rules and complex business logics. If text input components fail to correctly handle malicious or unexpected input texts
they may cause application crashes. Existing automated graphical user interface (GUI) testing tools for web applications often ignore these constraints. As a result
they cannot generate diverse inputs to effectively detect faults of text input components. Moreover
existing methods often overlook complex constraints among multiple text input components
which makes it difficult to generate diverse input combinations. To address this issue
this paper proposes an approach for testing text input components of web applications based on large language models (LLMs)
named LLM-based text input component testing (LTICT). First
LTICT extracts information about text input components from the HTML files of the application under test. It then uses a LLM to infer the constraints of the text input components and to synthesize a text generation program with respect to these constraints. Next
LTICT executes the program to produce input texts in batches to test text input components. Finally
LTICT feeds component contexts and execution outcomes back to the LLM. These feedbacks help the LLM to analyze inter-component constraints and to generate more diverse combinations of inputs. To evaluate the effectiveness of LTICT
comparative experiments are conducted on four open-source web applications with three automated testing tools
which are WebExplor
DBInputs
and QTypist. The experimental results show that LTICT detects more text input component faults
with improvements of 34.21%
37.84%
and 8.51% over WebExplor
DBInputs
and QTypist
respectively. In addition
LTICT reduces the average time required to detect text input component faults by 10.69%
11.87%
and 6.99%
respectively.
Liu Zhe , Chen Chunyang , Wang Junjie , et al . Testing the limits: Unusual text inputs generation for mobile app crash detection with large language model [C ] // Proceedings of the IEEE/ACM 46th International Conference on Software Engineering . New York : ACM , 2024 : 1 - 12 . DOI: 10.1145/3597503.3639118 http://dx.doi.org/10.1145/3597503.3639118
Wang Siyi , Wang Sinan , Fan Yujia , et al . Leveraging large vision-language model for better automatic web GUI testing [C ] // 2024 IEEE International Conference on Software Maintenance and Evolution . Piscataway : IEEE , 2024 : 125 - 137 . DOI: 10.1109/icsme58944.2024.00022 http://dx.doi.org/10.1109/icsme58944.2024.00022
Liu Zhe , Chen Chunyang , Wang Junjie , et al . Fill in the blank: Context-aware automated text input generation for mobile GUI testing [C ] // 2023 IEEE/ACM 45th International Conference on Software Engineering . Piscataway : IEEE , 2023 : 1355 - 1367 . DOI: 10.1109/icse48619.2023.00119 http://dx.doi.org/10.1109/icse48619.2023.00119
Clerissi D , Denaro G , Mobilio M , et al . Plug the database & play with automatic testing: Improving system testing by exploiting persistent data [C ] // Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering . New York : ACM , 2021 : 66 - 77 . DOI: 10.1145/3324884.3416561 http://dx.doi.org/10.1145/3324884.3416561
Sherin S , Muqeet A , Khan M U , et al . QExplore: An exploration strategy for dynamic web applications using guided search [J ] . Journal of Systems and Software , 2023 , 195 : 111512 . DOI: 10.1016/j.jss.2022.111512 http://dx.doi.org/10.1016/j.jss.2022.111512
Zheng Yan , Liu Yi , Xie Xiaofei , et al . Automatic web testing using curiosity-driven reinforcement learning [C ] // 2021 IEEE/ACM 43rd International Conference on Software Engineering . Piscataway : IEEE , 2021 : 423 - 435 . DOI: 10.1109/icse43902.2021.00048 http://dx.doi.org/10.1109/icse43902.2021.00048
Clerissi D , Denaro G , Mobilio M , et al . DBInputs: Exploiting persistent data to improve automated GUI testing [J ] . IEEE Transactions on Software Engineering , 2024 , 50 ( 9 ): 2412 - 2436 . DOI: 10.1109/tse.2024.3439002 http://dx.doi.org/10.1109/tse.2024.3439002
许婷 , 肖桐 , 张圣林 , 等 . 基于LLM的日志故障诊断 [J ] . 电子学报 , 2025 , 53 ( 4 ): 1123 - 1141 .
Xu Ting , Xiao Tong , Zhang Shenglin , et al . Log fault diagnosis based on large language models [J ] . Acta Electronica Sinica , 2025 , 53 ( 4 ): 1123 - 1141 . (in Chinese)
Azzam F , Saies A , Jaber M , et al . Evaluation for web GUI automation testing tool - experiment [C ] // 2022 International Symposium on Multidisciplinary Studies and Innovative Technologies . Piscataway : IEEE , 2022 : 549 - 554 . DOI: 10.1109/ismsit56059.2022.9932773 http://dx.doi.org/10.1109/ismsit56059.2022.9932773
Mattiello G R , Endo A T . Model-based testing leveraged for automated web tests [J ] . Software Quality Journal , 2022 , 30 ( 3 ): 621 - 649 . DOI: 10.1007/s11219-021-09575-w http://dx.doi.org/10.1007/s11219-021-09575-w
Biagiola M , Stocco A , Ricca F , et al . Diversity-based web test generation [C ] // Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering . New York : ACM , 2019 : 142 - 153 . DOI: 10.1145/3338906.3338970 http://dx.doi.org/10.1145/3338906.3338970
Biagiola M , Ricca F , Tonella P . Search based path and input data generation for web application testing [C ] // Search Based Software Engineering . Cham : Springer , 2017 : 18 - 32 . DOI: 10.1007/978-3-319-66299-2_2 http://dx.doi.org/10.1007/978-3-319-66299-2_2
Mariani L , Pezzè M , Riganelli O , et al . Link: Exploiting the web of data to generate test inputs [C ] // Proceedings of the 2014 International Symposium on Software Testing and Analysis . New York : ACM , 2014 : 373 - 384 . DOI: 10.1145/2610384.2610397 http://dx.doi.org/10.1145/2610384.2610397
Google . UI/application exerciser monkey [EB/OL ] . ( 2025-07-27 )[ 2025-09-30 ] . https://developer.android.com/studio/test/monkey https://developer.android.com/studio/test/monkey .
Li Yuanchun , Yang Ziyue , Guo Yao , et al . DroidBot: A lightweight UI-Guided test input generator for Android [C ] // 2017 IEEE/ACM 39th International Conference on Software Engineering Companion . Piscataway : IEEE , 2017 : 23 - 26 . DOI: 10.1109/icse-c.2017.8 http://dx.doi.org/10.1109/icse-c.2017.8
He Yuyu , Zhang Lei , Yang Zhemin , et al . TextExerciser: Feedback-driven text input exercising for Android applications [C ] // 2020 IEEE Symposium on Security and Privacy . Piscataway : IEEE , 2020 : 1071 - 1087 . DOI: 10.1109/sp40000.2020.00071 http://dx.doi.org/10.1109/sp40000.2020.00071
Alian P , Nashid N , Shahbandeh M , et al . Semantic constraint inference for web form test generation [C ] // Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis . New York : ACM , 2024 : 932 - 944 . DOI: 10.1145/3650212.3680332 http://dx.doi.org/10.1145/3650212.3680332
Liu Zhe , Chen Chunyang , Wang Junjie , et al . Make LLM a testing expert: Bringing human-like interaction to mobile GUI testing via functionality-aware decisions [C ] // Proceedings of the IEEE/ACM 46th International Conference on Software Engineering . New York : ACM , 2024 : 1 - 13 . DOI: 10.1145/3597503.3639180 http://dx.doi.org/10.1145/3597503.3639180
Le T , Tran T , Cao D , et al . KAT: Dependency-aware automated API testing with large language models [C ] // 2024 IEEE Conference on Software Testing, Verification and Validation . Piscataway : IEEE , 2024 : 82 - 92 . DOI: 10.1109/icst60714.2024.00017 http://dx.doi.org/10.1109/icst60714.2024.00017
Chen Jizheng , Du Kounianhua , Dai Xinyi , et al . DebateCoder: Towards collective intelligence of LLMs via test case driven LLM debate for code generation [C ] // Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics . Stroudsburg : ACL , 2025 : 12055 - 12065 . DOI: 10.18653/v1/2025.acl-long.589 http://dx.doi.org/10.18653/v1/2025.acl-long.589
Guo Yaoqi , Chen Zhenpeng , Zhang J M , et al . Personality-guided code generation using large language models [C ] // Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics . Stroudsburg : ACL , 2025 : 1068 - 1080 . DOI: 10.18653/v1/2025.acl-long.54 http://dx.doi.org/10.18653/v1/2025.acl-long.54
Alian P , Nashid N , Shahbandeh M , et al . Feature-driven end-to-end test generation [C ] // 2025 IEEE/ACM 47th International Conference on Software Engineering . Piscataway : IEEE , 2025 : 450 - 462 . DOI: 10.1109/icse55347.2025.00141 http://dx.doi.org/10.1109/icse55347.2025.00141
0
Views
7
下载量
0
CSCD
Publicity Resources
Related Articles
Related Author
Related Institution
京公网安备11010802024621