What I usually do is to use python for generating random tests - it is so much easier than C++/Java. Furthermore, it is easy enough to write a method that uses brute force in the same source code file as the solution (and asserting that two different solutions produce the same answer). Thereafter, I would press the up arrow and enter key in terminal repeatedly for multiple tests (I will also print the test case in console in case I accidentally skip a failing test case). Yes, this is a lazy method. But it suffices for my needs as it is fast and convenient without needing to resort to third party tester scripts.
Nevertheless, I appreciate your efforts to help others!
you can also use spoj testcase generator in competitive programming to generate test cases in specific format,length and number etc…even in matrix,tree,graph form.it will give u testcases but u have to manually test using testing code or just checking all answers.here is link