Search in sources :

Example 6 with Criterion

use of org.evosuite.Properties.Criterion in project evosuite by EvoSuite.

the class CoverageCriteriaAnalyzer method analyzeCoverage.

private static void analyzeCoverage(TestSuiteChromosome testSuite, String criterion) {
    try {
        Properties.Criterion crit = Properties.Criterion.valueOf(criterion.toUpperCase());
        analyzeCoverage(testSuite, crit);
    } catch (IllegalArgumentException e) {
        LoggingUtils.getEvoLogger().info("* Unknown coverage criterion: " + criterion);
    }
}
Also used : Criterion(org.evosuite.Properties.Criterion) Properties(org.evosuite.Properties)

Example 7 with Criterion

use of org.evosuite.Properties.Criterion in project evosuite by EvoSuite.

the class CoverageCriteriaAnalyzer method analyzeCoverage.

public static void analyzeCoverage(TestSuiteChromosome testSuite) {
    LoggingUtils.getEvoLogger().info("* Going to analyze the coverage criteria");
    Properties.Criterion[] criteria = Properties.CRITERION;
    /*
            As we analyze exactly the same criteria used during the search, we should do not
            need to re-instrument and re-run the tests
         */
    boolean recalculate = false;
    for (Properties.Criterion pc : criteria) {
        LoggingUtils.getEvoLogger().info("* Coverage analysis for criterion " + pc);
        analyzeCoverage(testSuite, pc, recalculate);
    }
}
Also used : Criterion(org.evosuite.Properties.Criterion) Criterion(org.evosuite.Properties.Criterion) Properties(org.evosuite.Properties)

Aggregations

Criterion (org.evosuite.Properties.Criterion)7 Properties (org.evosuite.Properties)6 TestFitnessFunction (org.evosuite.testcase.TestFitnessFunction)2 TestSuiteChromosome (org.evosuite.testsuite.TestSuiteChromosome)2 TestFitnessFactory (org.evosuite.coverage.TestFitnessFactory)1 FitnessFunction (org.evosuite.ga.FitnessFunction)1 RegressionTestSuiteChromosome (org.evosuite.regression.RegressionTestSuiteChromosome)1 DefaultTestCase (org.evosuite.testcase.DefaultTestCase)1 TestCase (org.evosuite.testcase.TestCase)1 TestChromosome (org.evosuite.testcase.TestChromosome)1 JUnitTestCarvedChromosomeFactory (org.evosuite.testcase.factories.JUnitTestCarvedChromosomeFactory)1 TestSuiteFitnessFunction (org.evosuite.testsuite.TestSuiteFitnessFunction)1 TestClass (org.junit.runners.model.TestClass)1