| System testing of a GUI-based application requires that test cases, consisting of sequences of user actions, be executed and the software’s output be verified. To en-able automated re-testing, such GUI test cases are increasingly being coded as low-level test scripts to be replayed automatically using test harnesses. Whenever the GUI changes,-idgets get moved around, windows get merged-some scripts be-come unusable because they no longer encode valid input sequences and hence, be-come unusable. Moreover, because the software’s output may have changed, their test oracles-ssertions and checkpoints-ncoded in the scripts may no longer reference the intended GUI objects. Existing automatic GUI test repair techniques use reverse engineering techniques to extract the event-flow graph (EFG) of subject applications, and adopt simple transformations to repair event sequences based on EFG. However, due to the limitations of modern reverse engineering techniques, the incomplete infor-mation stored in the automatic EFG can not handle complex low-level GUI test scripts.We present ScrlpTrepAireR (SITAR), a technique to automatically repair unusable low-level test scripts. SITAR creates 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, SITAR also 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. SITAR ammortizes the cost of human intervention across multiple scripts by accumulating the human knowledge as annotations on the EFG.An experiment using QTP test scripts suggest that SITAR is effective in that41%-89%unusable test scripts were repaired. SITAR repaired two completely unusable test suites to yield51.2%-62.3%line coverage. Annotations dramatically reduced human cost after20%test scripts had been repaired. |