Package org.gradle.api.internal.tasks.testing

Examples of org.gradle.api.internal.tasks.testing.TestResultProcessor


    public void executeTests() {
        TestSummaryListener listener = new TestSummaryListener(LoggerFactory.getLogger(Test.class));
        addTestListener(listener);
        addTestListener(new TestLogger(getServices().get(ProgressLoggerFactory.class)));

        TestResultProcessor resultProcessor = new TestListenerAdapter(getTestListenerBroadcaster().getSource());
        testExecuter.execute(this, resultProcessor);

        testFramework.report();

        if (!isIgnoreFailures() && listener.hadFailures()) {
View Full Code Here


        ClassLoader applicationClassLoader = Thread.currentThread().getContextClassLoader();
        ListenerBroadcast<TestResultProcessor> processors = new ListenerBroadcast<TestResultProcessor>(
                TestResultProcessor.class);
        processors.add(new JUnitXmlReportGenerator(testResultsDir));
        processors.add(resultProcessor);
        TestResultProcessor resultProcessorChain = new AttachParentTestResultProcessor(new CaptureTestOutputTestResultProcessor(processors.getSource(), outputRedirector));
        JUnitTestResultProcessorAdapter listener = new JUnit4TestResultProcessorAdapter(resultProcessorChain,
                timeProvider, idGenerator);
        executer = new JUnitTestClassExecuter(applicationClassLoader, listener, resultProcessorChain, idGenerator, timeProvider);
    }
View Full Code Here

        addTestOutputListener(testReportDataCollector);

        TestCountLogger testCountLogger = new TestCountLogger(getProgressLoggerFactory());
        addTestListener(testCountLogger);

        TestResultProcessor resultProcessor = new TestListenerAdapter(
                getTestListenerBroadcaster().getSource(), testOutputListenerBroadcaster.getSource());

        if (testExecuter == null) {
            testExecuter = new DefaultTestExecuter(getProcessBuilderFactory(), getActorFactory());
        }
View Full Code Here

    }

    public void startProcessing(TestResultProcessor resultProcessor) {
        // Build a result processor chain
        ClassLoader applicationClassLoader = Thread.currentThread().getContextClassLoader();
        TestResultProcessor resultProcessorChain = new AttachParentTestResultProcessor(new CaptureTestOutputTestResultProcessor(resultProcessor, outputRedirector));
        TestClassExecutionEventGenerator eventGenerator = new TestClassExecutionEventGenerator(resultProcessorChain, idGenerator, timeProvider);

        // Wrap the result processor chain up in a blocking actor, to make the whole thing thread-safe
        resultProcessorActor = actorFactory.createBlockingActor(eventGenerator);
        TestResultProcessor threadSafeResultProcessor = resultProcessorActor.getProxy(TestResultProcessor.class);
        TestClassExecutionListener threadSafeTestClassListener = resultProcessorActor.getProxy(TestClassExecutionListener.class);

        // Build the JUnit adaptor stuff
        JUnitTestEventAdapter junitEventAdapter = new JUnitTestEventAdapter(threadSafeResultProcessor, timeProvider, idGenerator);
        executer = new JUnitTestClassExecuter(applicationClassLoader, spec, junitEventAdapter, threadSafeTestClassListener);
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.tasks.testing.TestResultProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.