GTestXmlResultParser

public class GTestXmlResultParser
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.GTestXmlResultParser


Parses the 'xml output mode' results of native tests using GTest that run from shell, and informs a ITestRunListener of the results.

Summary

Public constructors

GTestXmlResultParser(String testRunName, listeners)

Creates the GTestXmlResultParser.

Public methods

getFailedTests()

Returns a list of tests that failed during the current test run.

boolean isTestRunIncomplete()

Whether the test run was incomplete or not.

void parseResult(File f, CollectingOutputReceiver output)

Parse the xml results

Public constructors

GTestXmlResultParser

public GTestXmlResultParser (String testRunName, 
                 listeners)

Creates the GTestXmlResultParser.

Parameters
testRunName String: the test run name to provide to ITestLifeCycleReceiver.testRunStarted(String, int)

listeners : informed of test results as the tests are executing

Public methods

getFailedTests

public  getFailedTests ()

Returns a list of tests that failed during the current test run.

Returns

isTestRunIncomplete

public boolean isTestRunIncomplete ()

Whether the test run was incomplete or not.

Returns
boolean true, if the test run was incomplete due to parsing issues or crashes.

parseResult

public void parseResult (File f, 
                CollectingOutputReceiver output)

Parse the xml results

Parameters
f File: ERROR(/File) containing the outputed xml

output CollectingOutputReceiver: The output collected from the execution run to complete the logs if necessary