/
DbBaseEMTest.java
35 lines (26 loc) · 1.16 KB
/
DbBaseEMTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package org.evomaster.e2etests.spring.examples.db.base;
import org.evomaster.core.Main;
import org.evomaster.core.problem.rest.HttpVerb;
import org.evomaster.core.problem.rest.RestIndividual;
import org.evomaster.core.search.Solution;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class DbBaseEMTest extends DbBaseTestBase {
@Test
public void testRunEM() throws Throwable {
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);
assertTrue(solution.getIndividuals().size() >= 1);
assertHasAtLeastOne(solution, HttpVerb.GET, 200, "/api/db/base/entitiesByName/{name}", "");
});
}
}