public JarCreatingJarFinder() { this(new ClassPathByteArraySource()); }
public CodeSource(final ProjectClassPaths classPath) { this(classPath, new Repository(new ClassPathByteArraySource( classPath.getClassPath()))); }
protected void createTesteeWith(final Predicate<MethodInfo> filter, final Collection<String> loggingClasses, final Collection<MethodMutatorFactory> mutators) { this.engine = new GregorMutater(new ClassPathByteArraySource(), filter, mutators); }
private void constructWithDepthOf(final int depth) { this.testee = new DependencyExtractor(new ClassPathByteArraySource(), depth); }
protected void createTesteeWith(final Predicate<MethodInfo> filter, final MethodMutatorFactory... mutators) { this.engine = new GregorMutater(new ClassPathByteArraySource(), filter, Arrays.asList(mutators)); }
protected void createTesteeWith(final Predicate<MethodInfo> filter, final Collection<MethodMutatorFactory> mutators) { createTesteeWith(new ClassPathByteArraySource(), filter, mutators); }
private static List<TestUnit> getTestsFromParent( final SafeDataInputStream dis, final CoverageOptions paramsFromParent) throws IOException { final List<ClassName> classes = receiveTestClassesFromParent(dis); Collections.sort(classes); // ensure classes loaded in a consistent order final Configuration testPlugin = createTestPlugin(paramsFromParent); verifyEnvironment(testPlugin); final List<TestUnit> tus = discoverTests(testPlugin, classes); final DependencyFilter filter = new DependencyFilter( new DependencyExtractor(new ClassPathByteArraySource(), paramsFromParent.getDependencyAnalysisMaxDistance()), paramsFromParent.getFilter()); final List<TestUnit> filteredTus = filter .filterTestsByDependencyAnalysis(tus); LOG.info("Dependency analysis reduced number of potential tests by " + (tus.size() - filteredTus.size())); return filteredTus; }
public CodeSource(final ProjectClassPaths classPath) { this(classPath, new Repository(new ClassPathByteArraySource( classPath.getClassPath()))); }
private static List<TestUnit> getTestsFromParent( final SafeDataInputStream dis, final CoverageOptions paramsFromParent) throws IOException { final List<ClassName> classes = receiveTestClassesFromParent(dis); Collections.sort(classes); // ensure classes loaded in a consistent order final Configuration testPlugin = createTestPlugin(paramsFromParent); verifyEnvironment(testPlugin); final List<TestUnit> tus = discoverTests(testPlugin, classes); final DependencyFilter filter = new DependencyFilter( new DependencyExtractor(new ClassPathByteArraySource(), paramsFromParent.getDependencyAnalysisMaxDistance()), paramsFromParent.getFilter()); final List<TestUnit> filteredTus = filter .filterTestsByDependencyAnalysis(tus); LOG.info("Dependency analysis reduced number of potential tests by " + (tus.size() - filteredTus.size())); return filteredTus; }
private List<MutationAnalysisUnit> buildMutationTests( final CoverageDatabase coverageData, final MutationEngine engine, EngineArguments args) { final MutationConfig mutationConfig = new MutationConfig(engine, coverage() .getLaunchOptions()); final ClassByteArraySource bas = fallbackToClassLoader(new ClassPathByteArraySource( this.data.getClassPath())); final TestPrioritiser testPrioritiser = this.settings.getTestPrioritiser() .makeTestPrioritiser(this.data.getFreeFormProperties(), this.code, coverageData); final MutationInterceptor interceptor = this.settings.getInterceptor() .createInterceptor(this.data, bas); final MutationSource source = new MutationSource(mutationConfig, testPrioritiser, bas, interceptor); final MutationAnalyser analyser = new IncrementalAnalyser( new DefaultCodeHistory(this.code, history()), coverageData); final WorkerFactory wf = new WorkerFactory(this.baseDir, coverage() .getConfiguration(), mutationConfig, args, new PercentAndConstantTimeoutStrategy(this.data.getTimeoutFactor(), this.data.getTimeoutConstant()), this.data.isVerbose(), this.data.isFullMutationMatrix(), this.data.getClassPath().getLocalClassPath()); final MutationGrouper grouper = this.settings.getMutationGrouper().makeFactory( this.data.getFreeFormProperties(), this.code, this.data.getNumberOfThreads(), this.data.getMutationUnitSize()); final MutationTestBuilder builder = new MutationTestBuilder(wf, analyser, source, grouper); return builder.createMutationTestUnits(this.code.getCodeUnderTestNames()); }