org.apache.maven.plugin.surefire.booterclient.output
Class FileOutputConsumerProxy

java.lang.Object
  extended by org.apache.maven.plugin.surefire.booterclient.output.OutputConsumerProxy
      extended by org.apache.maven.plugin.surefire.booterclient.output.FileOutputConsumerProxy
All Implemented Interfaces:
OutputConsumer

public class FileOutputConsumerProxy
extends OutputConsumerProxy

Surefire output consumer proxy that writes test output to a File for each test suite. This class is not threadsafe, but can be encapsulated with a SynchronizedOutputConsumer. It may still be accessed from different threads (serially).

Since:
2.1
Version:
$Id: FileOutputConsumerProxy.java 1049843 2010-12-16 09:32:19Z krosenvold $
Author:
Carlos Sanchez

Constructor Summary
FileOutputConsumerProxy(OutputConsumer outputConsumer, File reportsDirectory)
          Create a consumer that will write to a File for each test
 
Method Summary
 void consumeOutputLine(String line)
          Write the output to the current test file

 void testSetCompleted()
          Delegate to proxied OutputConsumer
 void testSetStarting(ReportEntry reportEntry)
          Delegate to proxied OutputConsumer
 
Methods inherited from class org.apache.maven.plugin.surefire.booterclient.output.OutputConsumerProxy
consumeFooterLine, consumeHeaderLine, consumeMessageLine, getOutputConsumer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOutputConsumerProxy

public FileOutputConsumerProxy(OutputConsumer outputConsumer,
                               File reportsDirectory)
Create a consumer that will write to a File for each test

Parameters:
outputConsumer - the output consumer
reportsDirectory - directory where files will be saved
Method Detail

testSetStarting

public void testSetStarting(ReportEntry reportEntry)
Description copied from class: OutputConsumerProxy
Delegate to proxied OutputConsumer

Specified by:
testSetStarting in interface OutputConsumer
Overrides:
testSetStarting in class OutputConsumerProxy
Parameters:
reportEntry - The ReportEntry with the name and group (optional) of the test that starts

testSetCompleted

public void testSetCompleted()
Description copied from class: OutputConsumerProxy
Delegate to proxied OutputConsumer

Specified by:
testSetCompleted in interface OutputConsumer
Overrides:
testSetCompleted in class OutputConsumerProxy

consumeOutputLine

public void consumeOutputLine(String line)
Write the output to the current test file

Specified by:
consumeOutputLine in interface OutputConsumer
Overrides:
consumeOutputLine in class OutputConsumerProxy
Parameters:
line - the line to process


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.