· 2 min read
Testing is important, automatically generating JUnit tests is magical
A couple of months ago I was introduced to Joe Ponczak, CEO of Codign Software, by my friend Andrew Glover. We had a great meeting where we discussed the current state of software quality management, test driven development, how hard it is to really test software well, and JUnit.
We all came to the conclusion that it would be great to have very high code coverage but that it’s a manual process fraught with difficulty and hassles as we go from 0% to even 50% or 60% test autmation and code coverage.
Then, Joe showed us CoView, his company’s new test automation tool. Andy and I were impressed. Really impressed. CoView is an Eclipse plug-in that automatically creates JUnit tests. These JUnit tests focus on executing code logic, “what-if” scenarios, and exception paths.
After going through the plug-in we could see that on average, it took a Java developer approximately 20 minutes to create a JUnit test case without knowing the level of coverage. It took CoView about 1.5 minutes to create a JUnit test case. Not only did the CoView-generated test cases execute as many “what if” scenarios as desired by the developer, they also resulted in 100% branch and basis path coverage. Very nice.
If you’re already doing JUnit testing, you owe it to yourself to check out CoView. If you’re not doing any test automation CoView could be your ticket into the test driven world without requiring hours and hours of manual test creation.
While I highly recommend it, the only drawbacks of CoView right now are:
- It’s an Eclipse plug-in. IntelliJ and other IDE users like me have to use Eclipse for the generator but once the test cases are generated they can be used in any IDE.
- Test frameworks other than JUnit are not yet supported. Perhaps Joe can comment and let us know what their plans are for some of the newer frameworks like TestNG.
- The generated test cases do have instrumentation code injected to track coverage and statistics. Joe and I talked about an option to generate code without instrumentation and he said they’re considering it but it will be difficult.
Head over to Codign and check out their free trial version.