1. A computer-implemented method, comprising: receiving, by an application development system, a first event generated by user interaction with an application being executed; generating first source code that corresponds to the first event; receiving, by the application development system, a second event generated by user interaction with the application; synthesizing the first and second events and generating second source code that is optimized based at least in part on the synthesis of both the first and second events; and replacing the first source code with the optimized second source code; and executing test source code configured to test the application, the test source code comprising the optimized second source code.