Java 类org.gradle.api.internal.tasks.testing.detection.TestFrameworkDetector 实例源码

项目:ide-plugins    文件:EclipseTestExecuter.java   
private List<String> collectTestNames(Test testTask, Object testTaskOperationId, Object rootTestSuiteId) {
    ClassNameCollectingProcessor processor = new ClassNameCollectingProcessor();
    Runnable detector;
    final FileTree testClassFiles = testTask.getCandidateClassFiles();
    if (testTask.isScanForTestClasses()) {
        TestFrameworkDetector testFrameworkDetector = testTask.getTestFramework().getDetector();
        testFrameworkDetector.setTestClasses(testTask.getTestClassesDirs().getFiles());
        testFrameworkDetector.setTestClasspath(testTask.getClasspath().getFiles());
        detector = new EclipsePluginTestClassScanner(testClassFiles, processor);
    } else {
        detector = new EclipsePluginTestClassScanner(testClassFiles, processor);
    }

    new TestMainAction(detector, processor, new NoOpTestResultProcessor(), Time.clock(), testTaskOperationId, rootTestSuiteId, String.format("Gradle Eclipse Test Run %s", testTask.getIdentityPath())).run();
    LOGGER.info("collected test class names: {}", processor.classNames);
    return processor.classNames;
}
项目:Reer    文件:TestNGTestClassDetecter.java   
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:Reer    文件:JUnitTestClassDetecter.java   
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:gradle-dockerized-test-plugin    文件:TestExecuter.java   
@Override
public void execute(final Test testTask, TestResultProcessor testResultProcessor) {
    final TestFramework testFramework = testTask.getTestFramework();
    final WorkerTestClassProcessorFactory testInstanceFactory = testFramework.getProcessorFactory();
    final Set<File> classpath = ImmutableSet.copyOf(testTask.getClasspath());
    final Factory<TestClassProcessor> forkingProcessorFactory = new Factory<TestClassProcessor>() {
        public TestClassProcessor create() {
            return new ForkingTestClassProcessor(workerFactory, testInstanceFactory, testTask,
                    classpath, testFramework.getWorkerConfigurationAction(), moduleRegistry);
        }
    };
    Factory<TestClassProcessor> reforkingProcessorFactory = new Factory<TestClassProcessor>() {
        public TestClassProcessor create() {
            return new RestartEveryNTestClassProcessor(forkingProcessorFactory, testTask.getForkEvery());
        }
    };

    TestClassProcessor processor = new MaxNParallelTestClassProcessor(testTask.getMaxParallelForks(),
            reforkingProcessorFactory, actorFactory);

    final FileTree testClassFiles = testTask.getCandidateClassFiles();

    Runnable detector;
    if (testTask.isScanForTestClasses()) {
        TestFrameworkDetector testFrameworkDetector = testTask.getTestFramework().getDetector();
        testFrameworkDetector.setTestClasses(testTask.getTestClassesDirs().getFiles());
        testFrameworkDetector.setTestClasspath(classpath);
        detector = new DefaultTestClassScanner(testClassFiles, testFrameworkDetector, processor);
    } else {
        detector = new DefaultTestClassScanner(testClassFiles, null, processor);
    }

    Object testTaskOperationId;

    try
    {
        testTaskOperationId = buildOperationExecutor.getCurrentOperation().getParentId();
    } catch (Exception e) {
        testTaskOperationId = UUID.randomUUID();
    }

    new TestMainAction(detector, processor, testResultProcessor, clock, testTaskOperationId, testTask.getPath(), "Gradle Test Run " + testTask.getIdentityPath()).run();
}
项目:Pushjet-Android    文件:TestNGTestClassDetecter.java   
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:Pushjet-Android    文件:JUnitTestClassDetecter.java   
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:Pushjet-Android    文件:TestNGTestClassDetecter.java   
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:Pushjet-Android    文件:JUnitTestClassDetecter.java   
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
    super(detector);
}
项目:Reer    文件:TestFramework.java   
/**
 * Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
 * executed.
 */
TestFrameworkDetector getDetector();
项目:Pushjet-Android    文件:TestFramework.java   
/**
 * Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
 * executed.
 */
TestFrameworkDetector getDetector();
项目:Pushjet-Android    文件:TestFramework.java   
/**
 * Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
 * executed.
 */
TestFrameworkDetector getDetector();