Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically create testcode from class (jars

We have thousands of classes without any true unit test coverage. As special project we aim to add reasonable coverage to all. One option is to create tests from sourced code and use GenerateTestCases plugin with IJ.

I am exploring other options to create tests massively..

Is it possible to create tests (okay, just test-templates) from class files? TestGen4J does this, but the project seems to be inactive. Is there any tool that could help in creating the tests for thousands of classes.

Once such tests are generated, I hope we have more momentum to add more unit tests for existing classes.

like image 538
Jayan Avatar asked Dec 20 '11 17:12

Jayan


2 Answers

Google CodePro Analytix eclipse plugin can generate the unit tests automatically for you and it is actively maintained.

like image 59
Aravind Yarram Avatar answered Oct 11 '22 13:10

Aravind Yarram


you can try netbeans tools too, select the class and right click tools/create Junit Test but its manual and ugly task to thousands files

like image 34
Grubhart Avatar answered Oct 11 '22 14:10

Grubhart