You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In recent versions of Randoop, the generated regression tests on the changed version of MyInteger (after gradlew third).
As far as I can see, the issue is that Randoop generates for the original code regression tests, which use most of the time 0 as a primitive value for the int parameter of MyInteger().
Rarely -1 and '#' are also used, but no -1 x -1 multiplication is called, hence the bug is not triggered.
I have not seen 10 or 100 as values, although they are defined in SeedSequences also.
Command used for Randoop as suggested in the tutorial (it was run on Windows 10 with openjdk version "12" 2019-03-19):
This workaround works well, but to use it, a dependency has to be added for the randoop jar file. build.gradle needs to be modified the following way (given that $RANDOOP_JAR holds the path to the jar file):
// In this section you declare the dependencies for your production and test code
dependencies {
// The production code uses the SLF4J logging API at compile time
implementation 'org.slf4j:slf4j-api:1.7.21'// Declare the dependency for your favourite test framework you want to use in your tests.// TestNG is also supported by the Gradle Test task. Just change the// testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add// 'test.useTestNG()' to your build script.
testImplementation 'junit:junit:4.12'
implementation files("$System.env.RANDOOP_JAR")
}
In recent versions of Randoop, the generated regression tests on the changed version of MyInteger (after gradlew third).
As far as I can see, the issue is that Randoop generates for the original code regression tests, which use most of the time
0
as a primitive value for theint
parameter of MyInteger().Rarely
-1
and '#' are also used, but no-1 x -1
multiplication is called, hence the bug is not triggered.I have not seen
10
or100
as values, although they are defined in SeedSequences also.Command used for Randoop as suggested in the tutorial (it was run on Windows 10 with openjdk version "12" 2019-03-19):
Output of Randoop:
Excerpt from the tests:
Interestingly, if I add a TestValue file with this content:
and use the command (with classlist.txt having MyInteger and TestValueExample):
then the tests contain mostly
-1
(but no-333
), and the bug is triggered:Are there any parameters to control how Randoop uses seed values?
The text was updated successfully, but these errors were encountered: