SleepReplacer: a novel tool-based approach for replacing thread sleeps in selenium WebDriver test code

D Olianas, M Leotta, F Ricca - Software Quality Journal, 2022 - Springer
Software Quality Journal, 2022Springer
Assuring quality of web applications is fundamental, given their relevance in the today's
world. A possible way to reach this goal is through end-to-end (E2E) testing, an approach in
which a web application is automatically tested by performing the actions that a user would
do. With modern web applications (for example, single-page applications), it is of great
importance to properly handle asynchronous calls in the test suite. In E2E Selenium
WebDriver test suites, asynchronous calls are usually managed in two ways: using thread …
Abstract
Assuring quality of web applications is fundamental, given their relevance in the today’s world. A possible way to reach this goal is through end-to-end (E2E) testing, an approach in which a web application is automatically tested by performing the actions that a user would do. With modern web applications (for example, single-page applications), it is of great importance to properly handle asynchronous calls in the test suite. In E2E Selenium WebDriver test suites, asynchronous calls are usually managed in two ways: using thread sleeps or explicit waits. The first is easier to use, but is inefficient and can lead to instability (also called flakiness, a problem often present in test suites that makes us lose confidence in the testing phase), while the second is usually more efficient but harder to use because, if the correct kind of wait is not carefully selected, it can introduce flakiness too. To help Testers, who often opt for the first strategy, we present in this work a tool-based approach to automatically replace thread sleeps with explicit waits in an E2E Selenium WebDriver test suite without introducing new flakiness. We empirically validated our tool named SleepReplacer on four different test suites, and we found that it can correctly replace in an automatic way from 81 to 100% of thread sleeps, leading to a significant reduction of the total execution time of the test suite (i.e., from 13 to 71%).
Springer
以上显示的是最相近的搜索结果。 查看全部搜索结果