Reputation: 5242
I am doing a hobby project from an online course and the project had been done by several groups of students in teams. The source code of the project (roughly 15k lines of java code) is shared by many students. I got hold of one such implementation which I consider to be correct / reference implementation. My objective is to understand the concepts as quickly as possible by implementing them while adding additional features . But the problem is the concepts and the requirements are not very clear to me and the reference implementation is not well commented. It does not contain any test cases either. I want to use the reference code and course material as a means of learning the concepts and quickly master them. I want to consider the reference code as a baseline and develop code for each file and function in my own way. However, being new to java, it's somewhat difficult for me to understand the constructs, and the purpose of each and every functions and variable used in the reference project.
In such such situation, what is a good strategy to quickly validate both the implementation ( reference and my implementation in a single project with Eclipse) ? How do I make or organize a project that will have two instances and the test suites/cases and perform equivalence checks? How should I create the test cases that would be quite reasonable to start with?
Upvotes: 0
Views: 42
Reputation: 57325
Firstly, I think you need to rethink your goal. Writing tests to cover all possible issues in a 15K line project is going to be a ... large task. Complicating your task is that you say that "the requirements are not very clear" - this makes testing much more difficult - how do you test against code when you're not completely sure how it should behave?
Best suggestion would be to work outward from a small slice of the requirements from the course, something where you think you understand the goals of the project and what you think the code should be doing, that can reasonably be covered by a few test cases.
Upvotes: 1