KIỂM THỬ TỰ ĐỘNG ỨNG DỤNG WEB THẾ HỆ MỚI
DOI:
https://doi.org/10.59266/houjs.2026.1166Từ khóa:
kiểm thử tự động, mô hình hướng dữ liệu, Playwright, ứng dụng Web phong phú (RIA), ứng dụng trang đơn (SPA)Tóm tắt
Nghiên cứu giải quyết bài toán kiểm thử tự động thiếu ổn định trên ứng dụng web phong phú (RIA) và ứng dụng trang đơn (SPA). Sự thay đổi DOM liên tục và trạng thái dữ liệu bất đồng bộ gây ra lỗi chập chờn (flaky tests) ở các công cụ truyền thống. Nghiên cứu đề xuất hệ thống kiểm thử tự động tích hợp mô hình hướng dữ liệu (Data-Driven Testing) và khung Playwright. Hệ thống áp dụng thuật toán đồng bộ hóa trạng thái giao diện với tầng mạng thông qua cơ chế chặn bắt API (network interception) và tự động chờ. Thuật toán này loại bỏ hoàn toàn việc sử dụng độ trễ thời gian tĩnh. Kết quả thực nghiệm trên các ứng dụng React, Vue và Angular ghi nhận tỷ lệ kịch bản thành công đạt 98,67% và giới hạn tỷ lệ lỗi chập chờn ở mức 1,33%. Cơ chế chạy đa luồng làm giảm 62,8% tổng thời gian thực thi. Cấu trúc tệp cấu hình JSON tách biệt cho phép mở rộng hệ thống sang các ứng dụng mới với chi phí bảo trì 0 dòng mã (0 LOC).
Tài liệu tham khảo
Amalfitano, D., Fasolino, A. R., & Tramontana, P. (2008). Reverse engineering finite state machines from rich Internet applications. In Proceedings of the 15th Working Conference on Reverse Engineering (pp. 69-73).
Artzi, S., Kiezun, A., Dolby, J., Tip, F., Dig, D., Paradkar, A., & Ernst, M. D. (2008). Finding bugs in dynamic web applications. In Proceedings of the 2008 International Symposium on Software Testing and Analysis (pp. 261-272).
Bau, J., Bursztein, E., Gupta, D., & Mitchell, J. C. (2010). State of the art: Automated black-box web application vulnerability testing. In Proceedings of the 2010 IEEE Symposium on Security and Privacy (pp. 332-345).
Benjamin, K., von Bochmann, G., Jourdan, G. V., & Onut, I. V. (2011). A strategy for efficient crawling of rich Internet applications. In Proceedings of the 11th International Conference on Web Engineering (pp. 74-89).
Choudhary, S. R., Prasad, M. R., & Orso, A. (2013). X-PERT: Accurate identification of cross-browser issues in web applications. In Proceedings of the 35th International Conference on Software Engineering (pp. 702-711).
Choudhary, S. R., Zhao, H., & Orso, A. (2012). CrossCheck: Combining crawling and differencing to better detect cross- browser incompatibilities in web applications. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering (pp. 66-75).
Dincturk, M. E., Jourdan, G. V., Bochmann, G. V., & Onut, I. V. (2014). A model-based approach for crawling rich Internet applications. ACM Transactions on the Web, 8(3), Article 19.
Fard, A. M., & Mesbah, A. (2013a). Feedback- directed exploration of web applications to derive test models. In Proceedings of the 24th International Symposium on Software Reliability Engineering (pp. 333-342).
Fard, A. M., & Mesbah, A. (2013b). JSNOSE: Detecting JavaScript code smells. In Proceedings of the 13th IEEE International Working Conference on Source Code Analysis and Manipulation (pp. 116-125).
Kiezun, A., Guo, P. J., Jayaraman, K., & Ernst, M. D. (2009). Automatic creation of SQL injection and cross-site scripting attacks. In Proceedings of the 31st International Conference on Software Engineering (pp. 199-209).
Lekies, S., Stock, B., & Johns, M. (2013). 25 million flows later: Large-scale detection of DOM-based XSS. In Proceedings of the 2013 ACM SIGSAC Conference on Computer and Communications Security (pp. 1193- 1204).
Marchetto, A., Ricca, F., & Tonella, P. (2008a). State-based testing of Ajax web applications. In Proceedings of the 2008 International Conference on Software Testing, Verification and Validation (pp. 121-130).
Marchetto, A., Ricca, F., & Tonella, P. (2008b). A case study-based comparison of web testing techniques applied to AJAX web applications. International Journal of Software Engineering and Knowledge Engineering, 18(4), 477-492.
Mesbah, A., Bozdag, E., & van Deursen, A. (2008). Crawling AJAX by inferring user interface state changes. In Proceedings of the 8th International Conference on Web Engineering (pp. 122-134).
Mesbah, A., & Prasad, M. R. (2011). Automated cross-browser compatibility testing. In Proceedings of the 33rd International Conference on Software Engineering (pp. 561-570).
Mesbah, A., & Roest, D. (2012). Automated testing of rich Internet applications. IEEE Software, 29(3), 56-61.
Mesbah, A., & van Deursen, A. (2009). Invariant-based automatic testing of AJAX user interfaces. In Proceedings of the 31st International Conference on Software Engineering (pp. 210-220).
Mirshokraie, S., Mesbah, A., & Pattabiraman, K. (2013). Efficient JavaScript mutation testing. In Proceedings of the 2013 International Conference on Software Testing, Verification and Validation (pp. 74-83).
Ocariza, F. S., Bajaj, K., Pattabiraman, K., & Mesbah, A. (2013). An empirical study of client-side JavaScript bugs. In Proceedings of the 2013 ACM/ IEEE International Symposium on Empirical Software Engineering and Measurement (pp. 55-64).
Ricca, F., & Tonella, P. (2001). Analysis and testing of web applications. In Proceedings of the 23rd International Conference on Software Engineering (pp. 25-34).
Stocco, A., Leotta, M., Ricca, F., & Tonella, P. (2015). Visual web test repair. In Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering (pp. 253-264).