Towards Creating Test Cases Using Code Search
Steven P. Reiss · 2014
Testing and testing code are critical to maintaining modern, evolving systems. Yet generating a good set of relevant test cases that covers what is important remains a difficult task. We propose a new approach to generating test cases through the use of code search. Open source repositories have made an enormous amount of code available. These contain unit tests for a wide variety of programs where the programmer has often given substantial thought to what should be tested, what is important to test, and how to test it. Our approach is to extract the relevant tests from on-line repositories and use these as the basis for test cases for user code.