Automatic Unit Test Generation and Execution for JavaScript Program through Symbolic Execution

JavaScript is expected to be a programming language of even wider use, considering demands for more interactive web/mobile applications. While reliability of JavaScript code will be of more importance, testing techniques for the language remain insufficient compared to other languages. We propose a technique to automatically generate high-coverage unit tests for JavaScript code. The technique makes use of symbolic execution engine for JavaScript code, and stub/driver generation engine which automatically generate stub for code of uninterest. Our methodology allows for fully automatic generation of input data for unit testing of JavaScript code with high coverage, which ensures quality of target code with reduced effort. Keywords–JavaScript, test generation, symbolic execution, stub generation.