Java源码示例:org.gradle.api.internal.tasks.testing.detection.TestFrameworkDetector
示例1
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例2
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例3
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例4
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例5
@Override
public void execute(final JvmTestExecutionSpec testExecutionSpec, TestResultProcessor testResultProcessor) {
final TestFramework testFramework = testExecutionSpec.getTestFramework();
final WorkerTestClassProcessorFactory testInstanceFactory = testFramework.getProcessorFactory();
final Set<File> classpath = ImmutableSet.copyOf(testExecutionSpec.getClasspath());
final Factory<TestClassProcessor> forkingProcessorFactory = new Factory<TestClassProcessor>() {
public TestClassProcessor create() {
return new ForkingTestClassProcessor(workerFactory, testInstanceFactory, testExecutionSpec.getJavaForkOptions(),
classpath, testFramework.getWorkerConfigurationAction(), moduleRegistry);
}
};
Factory<TestClassProcessor> reforkingProcessorFactory = new Factory<TestClassProcessor>() {
public TestClassProcessor create() {
return new RestartEveryNTestClassProcessor(forkingProcessorFactory, testExecutionSpec.getForkEvery());
}
};
processor = new MaxNParallelTestClassProcessor(testExecutionSpec.getMaxParallelForks(),
reforkingProcessorFactory, actorFactory);
final FileTree testClassFiles = testExecutionSpec.getCandidateClassFiles();
Runnable detector;
if (testExecutionSpec.isScanForTestClasses() && testFramework.getDetector() != null) {
TestFrameworkDetector testFrameworkDetector = testExecutionSpec.getTestFramework().getDetector();
testFrameworkDetector.setTestClasses(testExecutionSpec.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, testExecutionSpec.getPath(), "Gradle Test Run " + testExecutionSpec.getIdentityPath()).run();
}
示例6
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例7
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例8
TestNGTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例9
JUnitTestClassDetecter(final TestFrameworkDetector detector) {
super(detector);
}
示例10
/**
* Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
* executed.
*/
TestFrameworkDetector getDetector();
示例11
/**
* Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
* executed.
*/
TestFrameworkDetector getDetector();
示例12
/**
* Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
* executed.
*/
TestFrameworkDetector getDetector();
示例13
/**
* Returns a detector which is used to determine which of the candidate class files correspond to test classes to be
* executed.
*/
TestFrameworkDetector getDetector();