EventBreak: Analyzing the Responsiveness of User Interfaces through Performance-Guided Test Generation.
Michael Pradel, Parker Schuh, George C. Necula, Koushik Sen · 2015
Event-driven user interface applications typically have a sin-gle thread of execution that processes event handlers in re-sponse to input events triggered by the user, the network, or other applications. Programmers must ensure that event handlers terminate after a short amount of time because oth-erwise, the application may become unresponsive. This pa-per presents EventBreak, a performance-guided test genera-tion technique to identify and analyze event handlers whose execution time may gradually increase while using the ap-plication. The key idea is to systematically search for pairs of events where triggering one event increases the execution time of the other event. For example, this situation may hap-pen because one event accumulates data that is processed by the other event. We implement the approach for JavaScript-based web applications and apply it to three real-world appli-cations. EventBreak discovers events with an execution time that gradually increases in an unbounded way, which makes the application unresponsive, and events that, if triggered re-peatedly, reveal a severe scalability problem, which makes the application unusable. The approach reveals two known bugs and four previously unknown responsiveness problems. Furthermore, we show that EventBreak helps in testing that event handlers avoid such problems by bounding a handler’s execution time.