We examine per action energy consumption across four web user interface (UI) automation testing frameworks to determine whether consistent tendencies can guide energy-aware test design. Using a controlled client-server setup with external power metering, we repeat each UI action (refresh, click variants, checkbox, drag&drop, input-text, scroll) 35 times. Across each of the actions, energy costs vary by both framework and action. Puppeteer is the most efficient for left-click, right-click, double-click, checkbox, and input-text; Selenium is the most efficient for refresh and scroll; Nightwatch is generally the least energy efficient. The energy cost of performing the same action varied by up to a factor of six depending on the framework. This indicates that providing transparency of energy consumption for UI automation testing frameworks allows developers to make informed, energy-aware decisions when testing a specific UI action.
翻译:本研究通过测量四种网页用户界面(UI)自动化测试框架在每次操作中的能耗,以探究是否存在一致的能耗趋势,从而指导能源感知的测试设计。采用配备外部功率计量的受控客户端-服务器设置,我们对每种UI操作(刷新、点击变体、复选框、拖放、文本输入、滚动)重复执行35次。在所有操作中,能耗因框架和操作类型而异。Puppeteer在左键点击、右键点击、双击、复选框和文本输入操作中能效最高;Selenium在刷新和滚动操作中能效最高;Nightwatch通常能效最低。执行相同操作的能耗因框架不同可高达六倍差异。这表明,提供UI自动化测试框架的能耗透明度有助于开发者在测试特定UI操作时做出明智的、能源感知的决策。