public void testCase03_SeekChannelPerformance() throws Exception {
  int stationGap=0;
  int currentStation=FmRadioStation.getCurrentStation(mFmRadioActivity);
  long startTime=System.currentTimeMillis();
  Log.i(TAG,"[Performance test][FmRadio] seek previous channel start [" + startTime + "]");
  clickView(mButtonPrevStation);
  sleep(WAIT_UI_STATE_CHANGE);
  int searchStation=FmRadioStation.getCurrentStation(mFmRadioActivity);
  if (searchStation > currentStation) {
    stationGap=searchStation - currentStation;
    Log.i(TAG,"[Performance test][FmRadio] Test FmRadio seek time stationStep [" + (float)stationGap / CONVERT_RATE + "]");
  }
 else   if (searchStation < currentStation) {
    stationGap=FmRadioTestCaseUtil.HIGHEST_STATION - currentStation + searchStation - FmRadioTestCaseUtil.LOWEST_STATION;
    Log.i(TAG,"[Performance test][FmRadio] Test FmRadio seek time stationStep [" + (float)stationGap / CONVERT_RATE + "]");
  }
 else {
    Log.e(TAG,"SearchStation Unchanged");
  }
  currentStation=FmRadioStation.getCurrentStation(mFmRadioActivity);
  startTime=System.currentTimeMillis();
  Log.i(TAG,"[Performance test][FmRadio] seek next channel start [" + startTime + "]");
  clickView(mButtonNextStation);
  sleep(WAIT_UI_STATE_CHANGE);
  if (searchStation > currentStation) {
    stationGap=searchStation - currentStation;
    Log.i(TAG,"[Performance test][FmRadio] Test FmRadio seek time stationStep [" + (float)stationGap / CONVERT_RATE + "]");
  }
 else   if (searchStation < currentStation) {
    stationGap=FmRadioTestCaseUtil.HIGHEST_STATION - currentStation + searchStation - FmRadioTestCaseUtil.LOWEST_STATION;
    Log.i(TAG,"[Performance test][FmRadio] Test FmRadio seek time stationStep [" + (float)stationGap / CONVERT_RATE + "]");
  }
 else {
    Log.e(TAG,"SearchStation Unchanged");
  }
}

public void testCase03_SeekChannelPerformance ( ) throws Exception { int stationGap = 0 ; int currentStation = FmRadioStation . getCurrentStation ( mFmRadioActivity ) ; long startTime = System . currentTimeMillis ( ) ; Log . i ( TAG , "[Performance test][FmRadio] seek previous channel start [" + startTime + "]" ) ; clickView ( mButtonPrevStation ) ; sleep ( WAIT_UI_STATE_CHANGE ) ; int searchStation = FmRadioStation . getCurrentStation ( mFmRadioActivity ) ; if ( searchStation > currentStation ) { stationGap = searchStation - currentStation ; Log . i ( TAG , "[Performance test][FmRadio] Test FmRadio seek time stationStep [" + ( float ) stationGap / CONVERT_RATE + "]" ) ; } else if ( searchStation < currentStation ) { stationGap = FmRadioTestCaseUtil . HIGHEST_STATION - currentStation + searchStation - FmRadioTestCaseUtil . LOWEST_STATION ; Log . i ( TAG , "[Performance test][FmRadio] Test FmRadio seek time stationStep [" + ( float ) stationGap / CONVERT_RATE + "]" ) ; } else { Log . e ( TAG , "SearchStation Unchanged" ) ; } currentStation = FmRadioStation . getCurrentStation ( mFmRadioActivity ) ; startTime = System . currentTimeMillis ( ) ; Log . i ( TAG , "[Performance test][FmRadio] seek next channel start [" + startTime + "]" ) ; clickView ( mButtonNextStation ) ; sleep ( WAIT_UI_STATE_CHANGE ) ; if ( searchStation > currentStation ) { stationGap = searchStation - currentStation ; Log . i ( TAG , "[Performance test][FmRadio] Test FmRadio seek time stationStep [" + ( float ) stationGap / CONVERT_RATE + "]" ) ; } else if ( searchStation < currentStation ) { stationGap = FmRadioTestCaseUtil . HIGHEST_STATION - currentStation + searchStation - FmRadioTestCaseUtil . LOWEST_STATION ; Log . i ( TAG , "[Performance test][FmRadio] Test FmRadio seek time stationStep [" + ( float ) stationGap / CONVERT_RATE + "]" ) ; } else { Log . e ( TAG , "SearchStation Unchanged" ) ; } }
test seek channel performance .
