Search in sources :

Example 86 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class SymbolicObserverTest method test7.

@Test
public void test7() throws SecurityException, NoSuchMethodException, NoSuchFieldException {
    Properties.CLIENT_ON_THREAD = true;
    Properties.PRINT_TO_SYSTEM = true;
    Properties.TIMEOUT = 5000000;
    DefaultTestCase tc = build_test_input_7();
    System.out.println("TestCase=");
    System.out.println(tc.toCode());
    List<BranchCondition> branch_conditions = ConcolicExecution.executeConcolic(tc);
    printConstraints(branch_conditions);
    assertEquals(0, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 87 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class SymbolicObserverTest method test12.

@Test
public void test12() throws SecurityException, NoSuchMethodException, NoSuchFieldException {
    Properties.CLIENT_ON_THREAD = true;
    Properties.PRINT_TO_SYSTEM = true;
    Properties.TIMEOUT = 5000000;
    DefaultTestCase tc = build_test_input_12();
    System.out.println("TestCase=");
    System.out.println(tc.toCode());
    List<BranchCondition> branch_conditions = ConcolicExecution.executeConcolic(tc);
    printConstraints(branch_conditions);
    assertEquals(1, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 88 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class SymbolicObserverTest method test6.

@Test
public void test6() throws SecurityException, NoSuchMethodException, NoSuchFieldException {
    Properties.CLIENT_ON_THREAD = true;
    Properties.PRINT_TO_SYSTEM = true;
    Properties.TIMEOUT = 5000000;
    DefaultTestCase tc = build_test_input_6();
    System.out.println("TestCase=");
    System.out.println(tc.toCode());
    List<BranchCondition> branch_conditions = ConcolicExecution.executeConcolic(tc);
    printConstraints(branch_conditions);
    assertEquals(1, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 89 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class SymbolicObserverTest method test16.

@Test
public void test16() throws SecurityException, NoSuchMethodException, NoSuchFieldException {
    Properties.CLIENT_ON_THREAD = true;
    Properties.PRINT_TO_SYSTEM = true;
    Properties.TIMEOUT = 5000000;
    DefaultTestCase tc = build_test_input_16();
    System.out.println("TestCase=");
    System.out.println(tc.toCode());
    List<BranchCondition> branch_conditions = ConcolicExecution.executeConcolic(tc);
    printConstraints(branch_conditions);
    assertEquals(0, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Example 90 with DefaultTestCase

use of org.evosuite.testcase.DefaultTestCase in project evosuite by EvoSuite.

the class SymbolicObserverTest method test13.

@Test
public void test13() throws SecurityException, NoSuchMethodException, NoSuchFieldException {
    Properties.CLIENT_ON_THREAD = true;
    Properties.PRINT_TO_SYSTEM = true;
    Properties.TIMEOUT = 5000000;
    DefaultTestCase tc = build_test_input_13();
    System.out.println("TestCase=");
    System.out.println(tc.toCode());
    List<BranchCondition> branch_conditions = ConcolicExecution.executeConcolic(tc);
    printConstraints(branch_conditions);
    assertEquals(1, branch_conditions.size());
}
Also used : DefaultTestCase(org.evosuite.testcase.DefaultTestCase) Test(org.junit.Test)

Aggregations

DefaultTestCase (org.evosuite.testcase.DefaultTestCase)347 Test (org.junit.Test)234 Constraint (org.evosuite.symbolic.expr.Constraint)101 TestCase (org.evosuite.testcase.TestCase)78 ArrayList (java.util.ArrayList)63 CoverageGoalTestNameGenerationStrategy (org.evosuite.junit.naming.methods.CoverageGoalTestNameGenerationStrategy)47 MethodCoverageTestFitness (org.evosuite.coverage.method.MethodCoverageTestFitness)45 IntPrimitiveStatement (org.evosuite.testcase.statements.numeric.IntPrimitiveStatement)41 VariableReference (org.evosuite.testcase.variable.VariableReference)37 TestCaseStringAppendString (com.examples.with.different.packagename.solver.TestCaseStringAppendString)27 TestCaseStringIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringIndexOfString)27 TestCaseStringLastIndexOfString (com.examples.with.different.packagename.solver.TestCaseStringLastIndexOfString)27 IntegerConstraint (org.evosuite.symbolic.expr.IntegerConstraint)27 OutputCoverageGoal (org.evosuite.coverage.io.output.OutputCoverageGoal)25 OutputCoverageTestFitness (org.evosuite.coverage.io.output.OutputCoverageTestFitness)25 TestSuiteChromosome (org.evosuite.testsuite.TestSuiteChromosome)18 GenericMethod (org.evosuite.utils.generic.GenericMethod)17 TestChromosome (org.evosuite.testcase.TestChromosome)16 Method (java.lang.reflect.Method)14 BranchCoverageSuiteFitness (org.evosuite.coverage.branch.BranchCoverageSuiteFitness)14