public class

TestRunResult

extends Object
java.lang.Object
   ↳ com.android.tradefed.result.TestRunResult

Class Overview

Holds results from a single test run

Summary

Public Constructors
TestRunResult(String runName)
Create a TestRunResult.
TestRunResult()
Create an emptyTestRunResult.
Public Methods
void addMetrics(Map<String, String> runMetrics, boolean aggregateMetrics)
Adds test run metrics.
Set<TestIdentifier> getCompletedTests()
Gets the set of completed tests.
long getElapsedTime()
String getName()
int getNumCompleteTests()
Gets the number of complete tests in this run ie with status != incomplete.
int getNumErrorTests()
Gets the number of error tests in this run.
int getNumFailedTests()
Gets the number of failed tests in this run.
int getNumIncompleteTests()
Gets the number of incomplete tests in this run.
int getNumPassedTests()
Gets the number of passed tests for this run.
int getNumTests()
Gets the number of tests in this run.
String getRunFailureMessage()
Return the run failure error message, null if run did not fail.
Map<String, String> getRunMetrics()
Map<TestIdentifier, TestResult> getTestResults()
Gets a map of the test results.
boolean hasFailedTests()
boolean isRunComplete()
boolean isRunFailure()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TestRunResult (String runName)

Create a TestRunResult.

public TestRunResult ()

Create an emptyTestRunResult.

Public Methods

public void addMetrics (Map<String, String> runMetrics, boolean aggregateMetrics)

Adds test run metrics.

Parameters
runMetrics the run metrics
aggregateMetrics if true, attempt to add given metrics values to any currently stored values. If false, replace any currently stored metrics with the same key.

public Set<TestIdentifier> getCompletedTests ()

Gets the set of completed tests.

public long getElapsedTime ()

public String getName ()

Returns
  • the test run name

public int getNumCompleteTests ()

Gets the number of complete tests in this run ie with status != incomplete.

public int getNumErrorTests ()

Gets the number of error tests in this run.

public int getNumFailedTests ()

Gets the number of failed tests in this run.

public int getNumIncompleteTests ()

Gets the number of incomplete tests in this run.

public int getNumPassedTests ()

Gets the number of passed tests for this run.

public int getNumTests ()

Gets the number of tests in this run.

public String getRunFailureMessage ()

Return the run failure error message, null if run did not fail.

public Map<String, String> getRunMetrics ()

Returns
  • a Map of the test test run metrics.

public Map<TestIdentifier, TestResult> getTestResults ()

Gets a map of the test results.

public boolean hasFailedTests ()

Returns
  • true if test run had any failed or error tests.

public boolean isRunComplete ()

Returns
  • true if test run finished.

public boolean isRunFailure ()

Returns
  • true if test run failed.