In this paper, we present CoTester, a system designed to decrease the difficulty of testing web applications. CoTester allows testers to create test scripts that are represented in an easy-to-understand scripting language rather than a complex programming language, which allows tests to be created rapidly and by non-developers. CoTester improves the management of test scripts by grouping sequences of lowlevel actions into subroutines, such as “log in” or “check out shopping cart”, which help testers visualize test structure and make bulk modifications. A key innovation in CoTester is its ability to automatically identify these subroutines using a machine learning algorithm. Our algorithm is able to achieve 91% accuracy at recognizing a set of 7 representative subroutines commonly found in test scripts. ACM Classification Keywords H.3.3 Information Systems: Search and Retrieval; H.5.2 Information Interfaces and Presentation: User Interfaces General Terms Algorithms, Design, ...