I would like to have my regression tests generated by Randoop 4.2 to be named (Something)RandoopTest.java, so I set the command line flag --regression-test-basename=RandoopTest
. When I run Randoop, my regression tests all end in RandoopTest0.java (note the 0). For example, when I run the following command,
java -classpath C:\sandbox\TestJavaProject\bin;%RANDOOP_JAR%
randoop.main.Main gentests
--testclass=org.jaffa.datatypes.Currency
--junit-package-name=org.jaffa.datatypes
--junit-output-dir=C:\sandbox\TestJavaProject\src\test\java
--regression-test-basename=CurrencyRandoopTest
--time-limit=10
--junit-reflection-allowed=false
--flaky-test-behavior=DISCARD
I get two files generated, as shown by the console output:
Writing regression JUnit tests...
Created file C:\sandbox\TestJavaProject\src\test\java\org\jaffa\datatypes\CurrencyRandoopTest0.java
Created file C:\sandbox\TestJavaProject\src\test\java\org\jaffa\datatypes\CurrencyRandoopTestDriver.java
Wrote regression JUnit tests.
Is there an easy way to eliminate the 0? I'm curious as to why it is there. I've never noticed any other numbers besides 0 added to the class name. Currently, our maven scripts are designed to run JUit tests that end in "Test", so the 0 is a bother. (I know I can modify the scripts to automatically run JUnit tests that end in "Test0", but it would be nicer if I didn't have to.)