to top
public class

DeviceUnavailEmailResultReporter

extends EmailResultReporter
java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.result.EmailResultReporter
       ↳ com.android.tradefed.result.DeviceUnavailEmailResultReporter

Class Overview

An EmailResultReporter that will send email when invocation fails due to a device not available exception.

Summary

Public Constructors
DeviceUnavailEmailResultReporter()
Protected Methods
String generateEmailSubject()
A method to generate the subject for email reports.
boolean shouldSendMessage()
A method, meant to be overridden, which should do whatever filtering is decided and determine whether a notification email should be sent for the test results.
[Expand]
Inherited Methods
From class com.android.tradefed.result.EmailResultReporter
From class com.android.tradefed.result.CollectingTestListener
From class java.lang.Object
From interface com.android.tradefed.result.ITestSummaryListener
From interface com.android.tradefed.result.ITestInvocationListener
From interface com.android.ddmlib.testrunner.ITestRunListener

Public Constructors

public DeviceUnavailEmailResultReporter ()

Protected Methods

protected String generateEmailSubject ()

A method to generate the subject for email reports. Will not be called if shouldSendMessage() returns false.

Sample email subjects:

  • "Tradefed result for powerChromeFullSitesLocal on mantaray-user git_jb-mr1.1-release JDQ39: FAILED"
  • "Tradefed result for Monkey on build 25: FAILED"

Returns
  • A String containing the subject to use for an email report

protected boolean shouldSendMessage ()

A method, meant to be overridden, which should do whatever filtering is decided and determine whether a notification email should be sent for the test results. Presumably, would consider how many (if any) tests failed, prior failures of the same tests, etc.

Returns
  • true if a notification email should be sent, false if not