use of de.dagere.peass.execution.utils.TestExecutor in project peass by DaGeRe.
the class ContinuousExecutor method analyzeMeasurements.
private void analyzeMeasurements(final File measurementFolder) throws InterruptedException, IOException, JsonGenerationException, JsonMappingException, XmlPullParserException {
final ProjectStatistics statistics = new ProjectStatistics();
TestTransformer testTransformer = ExecutorCreator.createTestTransformer(folders, measurementConfig.getExecutionConfig(), measurementConfig);
TestExecutor executor = ExecutorCreator.createExecutor(folders, testTransformer, env);
ModuleClassMapping mapping = new ModuleClassMapping(folders.getProjectFolder(), executor.getModules(), measurementConfig.getExecutionConfig());
final AnalyseFullData afd = new AnalyseFullData(resultsFolders.getChangeFile(), statistics, mapping, measurementConfig.getStatisticsConfig());
afd.analyseFolder(measurementFolder);
Constants.OBJECTMAPPER.writeValue(resultsFolders.getStatisticsFile(), statistics);
}
use of de.dagere.peass.execution.utils.TestExecutor in project peass by DaGeRe.
the class DependencyTester method runOnce.
public void runOnce(final TestCase testcase, final String version, final int vmid, final File logFolder) throws IOException, InterruptedException, JAXBException, XmlPullParserException {
final TestExecutor testExecutor = getExecutor(folders, version);
final OnceRunner runner = new OnceRunner(folders, testExecutor, getCurrentOrganizer(), this);
runner.runOnce(testcase, version, vmid, logFolder);
}
use of de.dagere.peass.execution.utils.TestExecutor in project peass by DaGeRe.
the class DependencyTester method getExecutor.
protected synchronized TestExecutor getExecutor(final PeassFolders currentFolders, final String version) {
TestTransformer transformer = ExecutorCreator.createTestTransformer(currentFolders, configuration.getExecutionConfig(), configuration);
final TestExecutor testExecutor = ExecutorCreator.createExecutor(currentFolders, transformer, env);
return testExecutor;
}
use of de.dagere.peass.execution.utils.TestExecutor in project peass by DaGeRe.
the class TestDependencyManager method testBigFolderDeletion.
@Test
public void testBigFolderDeletion() throws IOException, InterruptedException, XmlPullParserException {
final PeassFolders folders = new PeassFolders(TestConstants.CURRENT_FOLDER);
final TestExecutor testExecutorMock = Mockito.mock(TestExecutor.class);
final File testFolder = new File(folders.getTempMeasurementFolder(), "MyTestClass/15231312");
final File rubishFile = new File(testFolder, "myRubish.txt");
prepareMock(folders, testExecutorMock, testFolder, rubishFile);
JUnitTestTransformer transformer = new JUnitTestTransformer(folders.getProjectFolder(), new MeasurementConfig(5));
Mockito.when(testExecutorMock.getTestTransformer()).thenReturn(transformer);
DependencyManager manager = new DependencyManager(testExecutorMock, folders);
manager.setDeleteFolderSize(1);
manager.initialyGetTraces("1");
Assert.assertFalse(rubishFile.exists());
Assert.assertFalse(testFolder.exists());
}
use of de.dagere.peass.execution.utils.TestExecutor in project peass by DaGeRe.
the class TestExecutorCreator method testMavenExecutorCreation.
@Test
public void testMavenExecutorCreation() throws IOException {
File pomFile = new File(temporaryFolder, "pom.xml");
FileUtils.touch(pomFile);
TestExecutor executor = createExecutor("default", Mockito.mock(JUnitTestTransformer.class));
MatcherAssert.assertThat(executor, IsInstanceOf.instanceOf(MavenTestExecutor.class));
}
Aggregations