Open MaelAudren opened 5 years ago
Hi @MaelAudren,
I have tried to generate test cases on my machine and it seems to work. Here is the step-by-step:
Checkout the project and the tutorial to get the binaries:
git clone https://github.com/ow2-proactive/catalog
git clone https://github.com/STAMP-project/evosuite-model-seeding-tutorial.git
cd catalog
Build and test
./gradlew test
Modify the build file and add your code (minus the hack for the jar file) to get the classpath (not sure that the other part is needed):
task('getClasspath') << {
File classpathFile = new File("catalogClasspath.txt")
String content = "";
configurations.testCompile.each {
content+=it
content+=":"
}
classpathFile.write(content);
}
Export the classpath:
./gradlew getClasspath
export catalog_classpath="build/classes/main/:build/classes/test/:"$(cat catalogClasspath.txt)
Build the models:
java -d64 -Xmx10000m -jar ../evosuite-model-seeding-tutorial/bin/botsing-model-generation-1.0.4-SNAPSHOT-jar-with-dependencies.jar \
-project_cp "$catalog_classpath" \
-project_prefix "org.ow2.proactive.catalog" \
-out_dir "results"
Remove test classes from the classpath (or use a different variable):
export catalog_classpath="build/classes/main/:"$(cat catalogClasspath.txt)
Optionally, you can list the testable classes:
java -d64 -Xmx4000m -jar ../evosuite-model-seeding-tutorial/bin/evosuite-master-1.0.7-SNAPSHOT.jar -listClasses -projectCP "$catalog_classpath" -prefix "org.ow2.proactive.catalog"
And run EvoSuite + model seeding on one of them (or a subpackage, see EvoSuite documentation for the exact parameters to use for that):
java -d64 -Xmx4000m -jar ../evosuite-model-seeding-tutorial/bin/evosuite-master-1.0.7-SNAPSHOT.jar \
-class "org.ow2.proactive.catalog.util.LinkUtil" \
-projectCP "$catalog_classpath" \
-generateMOSuite \
-Dalgorithm=DynaMOSA \
-Dsearch_budget=60 \
-Dseed_clone="0.5" \
-Donline_model_seeding=TRUE \
-Dmodel_path="results/models" \
-Dtest_dir="results/evosuite-tests" \
-Dreport_dir="results/evosuite-report" \
-Dno_runtime_dependency=true
Tests are generated in results/evosuite-tests
.
Characteristics
Description
The exception
java.lang.RuntimeException: not supported: class org.evosuite.utils.generic.WildcardTypeImpl
appears in the log after sucessfully running evosuite-model-seeding against the catalogSteps to reproduce
Run the following commands:
git clone https://github.com/ow2-proactive/catalog
cd catalog
Add the following lines to the build.gradle with your favorite editor
Run the following commands
./gradlew testJar
./gradlew getClasspath
java -d64 -Xmx10000m -jar bin/botsing-model-generation-1.0.4-SNAPSHOT-jar-with-dependencies.jar -project_cp $CLASSPATH -project_prefix org.ow2.proactive.catalog.rest.controller -out_dir OUTDIR
where CLASSPATH is the path to CATALOG_DIR/catalogClasspath.txt and OUTDIR is the result output directory.Exception:
catalogTestOutput.txt