SITAR: GUI Test Script Repair
Zebao Gao, Zhenyu Chen, Yunxiao Zou, Atif M. Memon · IEEE Transactions on Software Engineering · 2015
System testing of a GUI-based application requires that test cases, consisting of sequences of user actions/events, be executed and the software's output be verified. To enable automated re-testing, such test cases are increasingly being coded as low-level test scripts, to be replayed automatically using test harnesses. Whenever the GUI changes—widgets get moved around, windows get merged—some scripts become unusable because they no longer encode valid input sequences. Moreover, because the software's output may have changed, theirtest oracles—assertions and checkpoints—encoded in the scripts may no longer correctly check the intended GUI objects. We presentScrIpT repAireR(SITAR), a technique to automaticallyrepairunusable low-level test scripts.SITARuses reverse engineering techniques to create an abstract test for each script, maps it to an annotated event-flow graph (EFG), uses repairing transformations and human input to repair the test, and synthesizes a new “repaired” test script. During this process,SITARalso repairs the reference to the GUI objects used in the checkpoints yielding a final test script that can be executed automatically to validate the revised software.SITARamortizes the cost of human intervention across multiple scripts by accumulating the human knowledge as annotations on the EFG. An experiment using QTP test scripts suggests thatSITARis effective in that 41-89 percent unusable test scripts were repaired. Annotations significantly reduced human cost after 20 percent test scripts had been repaired.