Find methods related to testcases in Java

Posted by user3623718 on Programmers See other posts from Programmers or by user3623718
Published on 2014-06-08T11:59:05Z Indexed on 2014/06/08 15:42 UTC
Read the original article Hit count: 211

Filed under:
|

I want to automatically change some methods in the program. These methods contain some compiler error and my program aims to fix these compiler errors. After fixing compiler errors I need to run test cases related to the changed method (or class) to know it is correct and if not which test cases failed. As the programs under investigation are very big, I only need to run test cases related to changes. As an example, if I change one method, then I need to only run test cases related to this method.

Therefore, what I need is to programmatically be able to find test cases related to each method, and class. It is also useful if there is a tool that can do that for me. As an example, a tool which creates a matrix shows each test case is related to which method(s)

One easy way to do that is to run all test cases and save functions they accessed. However, the problem is at the beginning the input program contains compiler error and it is not possible to run test cases because of these compiler error.

Please let me know what is the best way to do that. An API or a tool that I can be used programmatically is the best for me.

© Programmers or respective owner

Related posts about java

Related posts about junit