use of eu.stamp_project.dspot.common.execution.TestRunner in project dspot by STAMP-project.
the class AbstractTestOnSample method setUp.
@Before
public void setUp() {
launcher = new Launcher();
launcher.addInputResource(getPathToProjectRoot() + "src/");
launcher.getEnvironment().setNoClasspath(true);
launcher.buildModel();
AssertionGeneratorUtils.init(false);
CloneHelper.init(false);
TestFramework.init(launcher.getFactory());
DSpotCache.init(10000);
RandomHelper.setSeedRandom(72L);
DSpotUtils.init(CommentEnum.None, null, null, null);
this.testRunner = new TestRunner(getPathToProjectRoot(), "", false);
}
use of eu.stamp_project.dspot.common.execution.TestRunner in project dspot by STAMP-project.
the class AbstractSelectorTest method setUp.
@Before
public void setUp() throws Exception {
DSpotState.verbose = true;
this.configuration = new UserInput();
this.configuration.setAbsolutePathToProjectRoot(getPathToAbsoluteProjectRoot());
this.configuration.setOutputDirectory(outputDirectory);
this.configuration.setGregorMode(true);
this.builder = AutomaticBuilderEnum.Maven.getAutomaticBuilder(configuration);
this.initializeDSpot = new InitializeDSpot();
String dependencies = initializeDSpot.completeDependencies(configuration, this.builder);
DSpotUtils.init(CommentEnum.None, outputDirectory, this.configuration.getFullClassPathWithExtraDependencies(), this.getPathToAbsoluteProjectRoot());
this.compiler = DSpotCompiler.createDSpotCompiler(configuration, dependencies);
DSpotCache.init(10000);
Launcher launcher = new Launcher();
launcher.getEnvironment().setNoClasspath(true);
launcher.addInputResource(this.getPathToAbsoluteProjectRoot());
launcher.buildModel();
this.factory = launcher.getFactory();
TestFramework.init(this.factory);
this.testRunner = new TestRunner(this.getPathToAbsoluteProjectRoot(), "", false);
this.testCompiler = new TestCompiler(0, false, this.getPathToAbsoluteProjectRoot(), this.configuration.getClasspathClassesProject(), 10000, "", false);
AssertionGeneratorUtils.init(false);
DSpotPOMCreator.createNewPom(configuration);
RandomHelper.setSeedRandom(72L);
ValueCreator.count = 0;
this.testSelectorUnderTest = this.getTestSelector();
}
use of eu.stamp_project.dspot.common.execution.TestRunner in project dspot by STAMP-project.
the class OneTestClassPitScoreMutantSelectorTest method setUp.
@Before
public void setUp() {
DSpotState.verbose = true;
this.configuration = new UserInput();
this.configuration.setAbsolutePathToProjectRoot("src/test/resources/test-projects/");
this.builder = AutomaticBuilderEnum.Maven.getAutomaticBuilder(configuration);
this.initializeDSpot = new InitializeDSpot();
DSpotCompiler.createDSpotCompiler(configuration, initializeDSpot.completeDependencies(configuration, this.builder));
Launcher launcher = new Launcher();
launcher.getEnvironment().setNoClasspath(true);
launcher.addInputResource("src/test/resources/test-projects/");
launcher.buildModel();
Factory factory = launcher.getFactory();
this.configuration.setFactory(factory);
this.configuration.setTestClasses(Collections.singletonList(FULL_QUALIFIED_NAME_TEST_CLASS));
this.configuration.setTargetOneTestClass(true);
this.testRunner = new TestRunner(this.configuration.getAbsolutePathToProjectRoot(), "", false);
}
Aggregations