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

Examples of org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor


        this.processor = processor;
        this.timeProvider = timeProvider;
    }

    public void startProcessing(TestResultProcessor testResultProcessor) {
        resultProcessor = new AttachParentTestResultProcessor(testResultProcessor);
        resultProcessor.started(suiteDescriptor, new TestStartEvent(timeProvider.getCurrentTime()));

        try {
            processor.startProcessing(resultProcessor);
        } catch (Throwable t) {
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

    private final Runnable detector;

    public TestMainAction(Runnable detector, TestClassProcessor processor, TestResultProcessor resultProcessor, TimeProvider timeProvider) {
        this.detector = detector;
        this.processor = processor;
        this.resultProcessor = new AttachParentTestResultProcessor(resultProcessor);
        this.timeProvider = timeProvider;
    }
View Full Code Here

        this.timeProvider = timeProvider;
    }

    public void startProcessing(TestResultProcessor testResultProcessor) {
        try {
            resultProcessor = new AttachParentTestResultProcessor(testResultProcessor);
            resultProcessor.started(suiteDescriptor, new TestStartEvent(timeProvider.getCurrentTime()));
            processor.startProcessing(resultProcessor);
        } catch (Throwable t) {
            resultProcessor.failure(suiteDescriptor.getId(), new TestSuiteExecutionException(String.format(
                    "Could not start %s.", suiteDescriptor), t));
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);
View Full Code Here

        if (!suiteFiles.isEmpty()) {
            testNg.setTestSuites(GFileUtils.toPaths(suiteFiles));

            Object rootId = idGenerator.generateId();
            TestDescriptorInternal rootSuite = new DefaultTestSuiteDescriptor(rootId, options.getDefaultTestName());
            TestResultProcessor decorator = new AttachParentTestResultProcessor(processor);
            decorator.started(rootSuite, new TestStartEvent(System.currentTimeMillis()));
            testNg.addListener((Object) adaptListener(new TestNGTestResultProcessorAdapter(decorator, idGenerator)));
            try {
                testNg.run();
            } finally {
                decorator.completed(rootId, new TestCompleteEvent(System.currentTimeMillis()));
            }
        } else {
            testNg.setTestClasses(testClasses.toArray(new Class[testClasses.size()]));
            testNg.addListener((Object) adaptListener(new TestNGTestResultProcessorAdapter(processor, idGenerator)));
            testNg.run();
View Full Code Here

TOP

Related Classes of org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor

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.