Google is committed to advancing racial equity for Black communities. See how.

XmlResultReporter

public class XmlResultReporter
extends CollectingTestListener implements ILogSaverListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.result.XmlResultReporter


Writes JUnit results to an XML files in a format consistent with Ant's XMLJUnitResultFormatter.

Unlike Ant's formatter, this class does not report the execution time of tests.

Collects all test info in memory, then dumps to file when invocation is complete.

Ported from dalvik runner XmlReportPrinter.

Result files will be stored in path constructed via [--output-file-path]/[build_id]

Summary

Public constructors

XmlResultReporter()

Public methods

void invocationEnded(long elapsedTime)

void setLogSaver(ILogSaver logSaver)

void testFailed(TestDescription test, String trace)

void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

Public constructors

XmlResultReporter

public XmlResultReporter ()

Public methods

invocationEnded

public void invocationEnded (long elapsedTime)

Parameters
elapsedTime long

setLogSaver

public void setLogSaver (ILogSaver logSaver)

Parameters
logSaver ILogSaver

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile