Permalink
Browse files

annotations to mark configs as Experimental

  • Loading branch information...
arcuri82 committed Aug 24, 2018
1 parent 2ae0a5c commit aa0b27bb1b054b0fe8fc26ed4450ffc4c9f55801
@@ -133,7 +133,20 @@ class EMConfig {
enumValues = " [Values: " + elements.joinToString(", ") + "]"
}
return text + constraints + enumValues
var description = "$text$constraints$enumValues"
val experimental = (m.annotations.find { it is Experimental } as? Experimental)
if(experimental != null){
/*
TODO: For some reasons, coloring is not working here.
Could open an issue at:
https://github.com/jopt-simple/jopt-simple
*/
//description = AnsiColor.inRed("EXPERIMENTAL: $description")
description = "EXPERIMENTAL: $description"
}
return description
}
@@ -255,6 +268,14 @@ class EMConfig {
@MustBeDocumented
annotation class Max(val max: Double)
/**
* This annotation is used to represent properties controlling
* features that are still work in progress.
* Do not use them (yet).
*/
@Target(AnnotationTarget.PROPERTY)
@MustBeDocumented
annotation class Experimental
//------------------------------------------------------------------------
//--- properties
@@ -417,15 +438,19 @@ class EMConfig {
@Min(1.0)
var maxTestSize = 10
@Experimental
@Cfg("Tracking of SQL commands to improve test generation")
var heuristicsForSQL = false
@Experimental
@Cfg("Enable EvoMaster to generate SQL data with direct accesses to the database. Use Dynamic Symbolic Execution")
var generateSqlDataWithDSE = false
@Experimental
@Cfg("Enable EvoMaster to generate SQL data with direct accesses to the database. Use a search algorithm")
var generateSqlDataWithSearch = false
@Experimental
@Cfg("When generating SQL data, how many new rows (max) to generate for each specific SQL Select")
@Min(1.0)
var maxSqlInitActionsPerMissingData = 5
@@ -12,22 +12,24 @@
@Test
public void testRunEM() {
public void testRunEM() throws Throwable {
String[] args = new String[]{
"--createTests", "true",
"--seed", "42",
"--sutControllerPort", "" + controllerPort,
"--maxActionEvaluations", "10000",
"--stoppingCriterion", "FITNESS_EVALUATIONS",
"--heuristicsForSQL", "true",
"--generateSqlDataWithSearch", "false"
};
handleFlaky(() -> {
String[] args = new String[]{
"--createTests", "true",
"--seed", "42",
"--sutControllerPort", "" + controllerPort,
"--maxActionEvaluations", "10000",
"--stoppingCriterion", "FITNESS_EVALUATIONS",
"--heuristicsForSQL", "true",
"--generateSqlDataWithSearch", "false"
};
Solution<RestIndividual> solution = (Solution<RestIndividual>) Main.initAndRun(args);
Solution<RestIndividual> solution = (Solution<RestIndividual>) Main.initAndRun(args);
assertTrue(solution.getIndividuals().size() >= 1);
assertTrue(solution.getIndividuals().size() >= 1);
assertHasAtLeastOne(solution, HttpVerb.GET, 200, "/api/db/base/entitiesByName/{name}", "");
assertHasAtLeastOne(solution, HttpVerb.GET, 200, "/api/db/base/entitiesByName/{name}", "");
});
}
}
View
@@ -233,7 +233,7 @@
<dependency> <!-- Used to handle terminal/console inputs -->
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
<version>6.0-alpha-1</version>
<version>6.0-alpha-2</version>
</dependency>

0 comments on commit aa0b27b

Please sign in to comment.