GranularRetriableTestWrapper.StartEndCollector
  public
  
  
  
  class
  GranularRetriableTestWrapper.StartEndCollector
  
  
  
  
  
  
  
    extends ResultAndLogForwarder
  
  
  
  
  
  
| java.lang.Object | |||
| ↳ | com.android.tradefed.result.ResultForwarder | ||
| ↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
| ↳ | com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector | ||
用于捕获缺失的运行开始和结束时间的类辅助程序。
摘要
字段 | |
|---|---|
    public
    
    
    boolean | 
    
      mRunEndedReported
      
  | 
  
    public
    
    
    boolean | 
    
      mRunStartReported
      
  | 
  
公共方法 | |
|---|---|
        
        
        
        
        
        void
     | 
  
    
      
      testRunEnded(long elapsedTimeMillis, 
      
        报告测试运行结束。  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      testRunStarted(String runName, int testCount)
      
      
        报告测试运行的开始。  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
      
      
        报告测试运行的开始。  | 
  
        
        
        
        
        
        void
     | 
  
    
      
      testRunStarted(String runName, int testCount, int attemptNumber)
      
      
        报告测试运行的开始。  | 
  
字段
mRunEndedReported
public boolean mRunEndedReported
mRunStartReported
public boolean mRunStartReported
公共方法
testRunEnded
public void testRunEnded (long elapsedTimeMillis, 
                 runMetrics) 报告测试运行结束。
| 参数 | |
|---|---|
elapsedTimeMillis | 
        
          long:设备报告的经过时间(以毫秒为单位) | 
      
runMetrics | 
        
          :测试运行结束时报告的键值对 | 
      
testRunStarted
public void testRunStarted (String runName, 
                int testCount)报告测试运行的开始。
| 参数 | |
|---|---|
runName | 
        
          String:测试运行作业名称 | 
      
testCount | 
        
          int:测试运行中的测试总数 | 
      
testRunStarted
public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)报告测试运行的开始。
| 参数 | |
|---|---|
runName | 
        
          String:测试运行作业名称 | 
      
testCount | 
        
          int:测试运行中的测试总数 | 
      
attemptNumber | 
        
          int:顺序号,用于标识多次运行同一 runName 的不同尝试。attemptNumber 从 0 开始编号,每次有新的运行时都应递增。例如,如果某个测试进行了 3 次精细重试,则它在同一 runName 下总共应有 4 次运行,并且 attemptNumber 应介于 0 到 3 之间。 | 
      
startTime | 
        
          long:运行开始时间,通过 System.currentTimeMillis() 测量 | 
      
testRunStarted
public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)报告测试运行的开始。
| 参数 | |
|---|---|
runName | 
        
          String:测试运行作业名称 | 
      
testCount | 
        
          int:测试运行中的测试总数 | 
      
attemptNumber | 
        
          int:顺序号,用于标识多次运行同一 runName 的不同尝试。attemptNumber 从 0 开始编号,每次有新的运行时都应递增。例如,如果某个测试进行了 3 次精细重试,则它在同一 runName 下总共应有 4 次运行,并且 attemptNumber 应介于 0 到 3 之间。 |