Randoop generates tests with same name for all of the classes

182 views Asked by At

I want to generate tests for 200 classes (I have put their classes names in --classlist txt) but Randoop generates RegressionTest0.java to RegressionTestN.java and replaces generated files because they have same name. Is it possible for Randoop to generate tests files with same name as class names, I have put in the classlist file? For example, I have a KMeans.java class and Randoop generate KMeans0.java to KMeansN.java instead of RegressionTest.java? Thanks.

1

There are 1 answers

0
mernst On BEST ANSWER

Each generated test may call any or all of the classes under test. For example, if your classlist file contains Class1.java, Class2.java, and Class3.java, then each generated test might call all three classes. Randoop does not create a separate set of tests for each class.

If there is only one class under test (which is definitely against the recommended practice!), then you could rename the files and the classes within them after they are generated. But that is not your situation, as you described above.