ScreenshotOnFailureCollector
  public
  
  
  
  class
  ScreenshotOnFailureCollector
  
  
  
  
    extends BaseDeviceMetricCollector
  
  
  
  
  
  
| java.lang.Object | ||
| ↳ | com.android.tradefed.device.metric.BaseDeviceMetricCollector | |
| ↳ | com.android.tradefed.device.metric.ScreenshotOnFailureCollector | |
Collector that will capture and log a screenshot when a test case fails.
Summary
Public constructors | |
|---|---|
      
      ScreenshotOnFailureCollector()
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        void
     | 
  
    
      
      onTestFail(DeviceMetricData testData, TestDescription test)
      
      
        Callback when a test case fails.  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      onTestRunStart(DeviceMetricData runData)
      
      
        Callback when a test run is started.  | 
  
Public constructors
ScreenshotOnFailureCollector
public ScreenshotOnFailureCollector ()
Public methods
onTestFail
public void onTestFail (DeviceMetricData testData, TestDescription test)
Callback when a test case fails.
| Parameters | |
|---|---|
testData | 
        
          DeviceMetricData: the DeviceMetricData holding the data for the test case. | 
      
test | 
        
          TestDescription: the TestDescription of the test case in progress. | 
      
| Throws | |
|---|---|
DeviceNotAvailableException | 
          |
onTestRunStart
public void onTestRunStart (DeviceMetricData runData)
Callback when a test run is started.
| Parameters | |
|---|---|
runData | 
        
          DeviceMetricData: the DeviceMetricData holding the data for the run. |