Search in sources :

Example 1 with PitXMLResultParser

use of eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser in project dspot by STAMP-project.

the class MavenAutomaticBuilderTest method setUp.

public void setUp(String path, String filter, boolean isDescartesMode, String additionalClasspathElements) {
    this.parser = new PitXMLResultParser();
    this.configuration = new UserInput();
    this.configuration.setAbsolutePathToProjectRoot(new File(path).getAbsolutePath());
    this.configuration.setGregorMode(!isDescartesMode);
    this.configuration.setFilter(filter);
    this.configuration.setAdditionalClasspathElements(additionalClasspathElements);
    this.builder = AutomaticBuilderEnum.Maven.getAutomaticBuilder(this.configuration);
    DSpotPOMCreator.createNewPom(this.configuration);
    this.launcher = new Launcher();
    this.launcher.addInputResource(path + "/src/");
    this.launcher.getEnvironment().setNoClasspath(true);
    this.launcher.buildModel();
    DSpotState.verbose = true;
    try {
        FileUtils.deleteDirectory(new File(path + "/target/"));
    } catch (IOException ignored) {
    // ignored
    }
    builder.compileAndBuildClasspath();
}
Also used : PitXMLResultParser(eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser) UserInput(eu.stamp_project.dspot.common.configuration.UserInput) Launcher(spoon.Launcher) IOException(java.io.IOException) File(java.io.File)

Example 2 with PitXMLResultParser

use of eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser in project dspot by STAMP-project.

the class GradleAutomaticBuilderTest method setUp.

@Before
public void setUp() throws Exception {
    // assumeTrue("true".equals(System.getProperty("doIntegrationTests")));
    DSpotState.verbose = true;
    cleanTestEnv();
    LOGGER.debug("Test Set-up - Reading input parameters...");
    LOGGER.debug("Test Set-up - instantiating Automatic Builder (SUT)...");
    final UserInput configuration = new UserInput();
    configuration.setAbsolutePathToProjectRoot(this.pathToProjectRoot);
    configuration.setGregorMode(true);
    configuration.setFilter("example.*");
    launcher = new Launcher();
    launcher.addInputResource(pathToProjectRoot + "src/");
    launcher.getEnvironment().setNoClasspath(true);
    launcher.buildModel();
    sut = AutomaticBuilderEnum.Gradle.getAutomaticBuilder(configuration);
    sut.compile();
    LOGGER.debug("Test Set-up complete.");
    parser = new PitXMLResultParser();
}
Also used : PitXMLResultParser(eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser) UserInput(eu.stamp_project.dspot.common.configuration.UserInput) Launcher(spoon.Launcher) Before(org.junit.Before)

Example 3 with PitXMLResultParser

use of eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser in project dspot by STAMP-project.

the class GradleAutomaticBuilderWithDescartesTest method setUp.

@Before
public void setUp() throws Exception {
    DSpotState.verbose = true;
    cleanTestEnv();
    LOGGER.debug("Test Set-up - Reading input parameters...");
    LOGGER.debug("Test Set-up - instantiating Automatic Builder (SUT)...");
    final UserInput configuration = new UserInput();
    configuration.setAbsolutePathToProjectRoot(this.pathToProjectRoot);
    configuration.setGregorMode(true);
    configuration.setFilter("example.*");
    launcher = new Launcher();
    launcher.addInputResource(pathToProjectRoot + "src/");
    launcher.getEnvironment().setNoClasspath(true);
    launcher.buildModel();
    sut = AutomaticBuilderEnum.Gradle.getAutomaticBuilder(configuration);
    sut.compile();
    LOGGER.debug("Test Set-up complete.");
    parser = new PitXMLResultParser();
}
Also used : PitXMLResultParser(eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser) UserInput(eu.stamp_project.dspot.common.configuration.UserInput) Launcher(spoon.Launcher) Before(org.junit.Before)

Aggregations

UserInput (eu.stamp_project.dspot.common.configuration.UserInput)3 PitXMLResultParser (eu.stamp_project.dspot.selector.pitmutantscoreselector.PitXMLResultParser)3 Launcher (spoon.Launcher)3 Before (org.junit.Before)2 File (java.io.File)1 IOException (java.io.IOException)1