au.com.rayh
Class XCodeBuildOutputParser

java.lang.Object
  extended by au.com.rayh.XCodeBuildOutputParser
Direct Known Subclasses:
JenkinsXCodeBuildOutputParser

public class XCodeBuildOutputParser
extends Object

Parse Xcode output and transform into JUnit-style xml test result files. This utility class creates and manages a FilterOutputStream to parse the Xcode output to capture the results of ocunit tests.

Author:
John Bito

Nested Class Summary
 class XCodeBuildOutputParser.LineBasedFilterOutputStream
           
 
Field Summary
protected  OutputStream captureOutputStream
           
protected  TestCase currentTestCase
           
protected  TestSuite currentTestSuite
           
protected  int exitCode
           
 
Constructor Summary
protected XCodeBuildOutputParser()
           
  XCodeBuildOutputParser(File workspace, OutputStream log)
          Initalize the FilterOutputStream and prepare to generate the JUnit result files
 
Method Summary
 int getExitCode()
           
 OutputStream getOutputStream()
           
protected  void handleLine(String line)
           
protected  OutputStream outputForSuite()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

captureOutputStream

protected OutputStream captureOutputStream

exitCode

protected int exitCode

currentTestSuite

protected TestSuite currentTestSuite

currentTestCase

protected TestCase currentTestCase
Constructor Detail

XCodeBuildOutputParser

protected XCodeBuildOutputParser()

XCodeBuildOutputParser

public XCodeBuildOutputParser(File workspace,
                              OutputStream log)
Initalize the FilterOutputStream and prepare to generate the JUnit result files

Parameters:
workspace - directory that will receive the result files
log - the Xcode output stream that should be parsed
Method Detail

outputForSuite

protected OutputStream outputForSuite()
                               throws IOException,
                                      InterruptedException
Throws:
IOException
InterruptedException

handleLine

protected void handleLine(String line)
                   throws ParseException,
                          IOException,
                          InterruptedException,
                          javax.xml.bind.JAXBException
Throws:
ParseException
IOException
InterruptedException
javax.xml.bind.JAXBException

getOutputStream

public OutputStream getOutputStream()

getExitCode

public int getExitCode()


Copyright © 2004-2015. All Rights Reserved.