Ruilian Zhao, Shukai Zhang, Zhifan Zhu, Ying Shang, Weiwei Wang
{"title":"基于状态重用的网络应用程序 E2E 测试执行优化","authors":"Ruilian Zhao, Shukai Zhang, Zhifan Zhu, Ying Shang, Weiwei Wang","doi":"10.1002/smr.2714","DOIUrl":null,"url":null,"abstract":"End‐to‐end (E2E) testing is a commonly used technique for web application testing. Unlike traditional unit tests, E2E tests focus on test scenarios that target the entire business, which integrate and collaborate of various components and services to make the whole application work. As a result, one drawback of E2E tests is their longer execution time, seriously affecting testing efficiency of web applications. In order to speed up the execution of E2E tests for web applications, this paper proposes a test execution optimization approach based page state reuse. Through analyzing the common operations of E2E tests, a common prefix trees is constructed to organize the same operations among test scripts in a test suite of web applications. Under the guidance of the prefix tree, the optimal reusable state is identified and duplicated to maximize the utilization of page states triggered by the same operations, thereby reducing the overall execution time of the test suite. Besides, to realize page state reuse automatically, we design a browser process replication strategy, which implement querying the active page and duplicating the web page. To verify the effectiveness of our method, experiments and evaluations were conducted on 347 E2E tests from eight open‐source web applications, and the results showed that our approach reduced the E2E testing execution time for web applications by 52%–68%.","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"60 1","pages":""},"PeriodicalIF":1.7000,"publicationDate":"2024-09-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"E2E test execution optimization for web application based on state reuse\",\"authors\":\"Ruilian Zhao, Shukai Zhang, Zhifan Zhu, Ying Shang, Weiwei Wang\",\"doi\":\"10.1002/smr.2714\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"End‐to‐end (E2E) testing is a commonly used technique for web application testing. Unlike traditional unit tests, E2E tests focus on test scenarios that target the entire business, which integrate and collaborate of various components and services to make the whole application work. As a result, one drawback of E2E tests is their longer execution time, seriously affecting testing efficiency of web applications. In order to speed up the execution of E2E tests for web applications, this paper proposes a test execution optimization approach based page state reuse. Through analyzing the common operations of E2E tests, a common prefix trees is constructed to organize the same operations among test scripts in a test suite of web applications. Under the guidance of the prefix tree, the optimal reusable state is identified and duplicated to maximize the utilization of page states triggered by the same operations, thereby reducing the overall execution time of the test suite. Besides, to realize page state reuse automatically, we design a browser process replication strategy, which implement querying the active page and duplicating the web page. To verify the effectiveness of our method, experiments and evaluations were conducted on 347 E2E tests from eight open‐source web applications, and the results showed that our approach reduced the E2E testing execution time for web applications by 52%–68%.\",\"PeriodicalId\":48898,\"journal\":{\"name\":\"Journal of Software-Evolution and Process\",\"volume\":\"60 1\",\"pages\":\"\"},\"PeriodicalIF\":1.7000,\"publicationDate\":\"2024-09-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Software-Evolution and Process\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://doi.org/10.1002/smr.2714\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1002/smr.2714","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
E2E test execution optimization for web application based on state reuse
End‐to‐end (E2E) testing is a commonly used technique for web application testing. Unlike traditional unit tests, E2E tests focus on test scenarios that target the entire business, which integrate and collaborate of various components and services to make the whole application work. As a result, one drawback of E2E tests is their longer execution time, seriously affecting testing efficiency of web applications. In order to speed up the execution of E2E tests for web applications, this paper proposes a test execution optimization approach based page state reuse. Through analyzing the common operations of E2E tests, a common prefix trees is constructed to organize the same operations among test scripts in a test suite of web applications. Under the guidance of the prefix tree, the optimal reusable state is identified and duplicated to maximize the utilization of page states triggered by the same operations, thereby reducing the overall execution time of the test suite. Besides, to realize page state reuse automatically, we design a browser process replication strategy, which implement querying the active page and duplicating the web page. To verify the effectiveness of our method, experiments and evaluations were conducted on 347 E2E tests from eight open‐source web applications, and the results showed that our approach reduced the E2E testing execution time for web applications by 52%–68%.