DeviceUnavailEmailResultReporter

public class DeviceUnavailEmailResultReporter
extends EmailResultReporter

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


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.

Public constructors

DeviceUnavailEmailResultReporter

DeviceUnavailEmailResultReporter ()

Protected methods

generateEmailSubject

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
String A String containing the subject to use for an email report

shouldSendMessage

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
boolean true if a notification email should be sent, false if not