/tools/tradefederation/core/javatests/com/android/tradefed/testtype/ |
D | HostTestTest.java | 106 @Mock ITestInvocationListener mListener; field in HostTestTest 641 mHostTest.run(mTestInfo, mListener); in testRun_testcase() 643 verify(mListener).testRunStarted((String) Mockito.any(), Mockito.eq(2)); in testRun_testcase() 644 verify(mListener).testStarted(Mockito.eq(test1)); in testRun_testcase() 645 verify(mListener).testEnded(Mockito.eq(test1), (HashMap<String, Metric>) Mockito.any()); in testRun_testcase() 646 verify(mListener).testStarted(Mockito.eq(test2)); in testRun_testcase() 647 verify(mListener).testEnded(Mockito.eq(test2), (HashMap<String, Metric>) Mockito.any()); in testRun_testcase() 648 verify(mListener).testRunEnded(Mockito.anyLong(), (HashMap<String, Metric>) Mockito.any()); in testRun_testcase() 662 mHostTest.run(mTestInfo, mListener); in testRun_MetricTestCase() 664 verify(mListener).testRunStarted((String) Mockito.any(), Mockito.eq(2)); in testRun_MetricTestCase() [all …]
|
D | FakeTestTest.java | 48 @Mock ITestInvocationListener mListener; field in FakeTestTest 160 mTest.run(mTestInfo, mListener); in testRun_empty() 161 InOrder inOrder = Mockito.inOrder(mListener); in testRun_empty() 162 inOrder.verify(mListener).testRunStarted(Mockito.eq(name), Mockito.eq(0)); in testRun_empty() 163 inOrder.verify(mListener) in testRun_empty() 172 mTest.run(mTestInfo, mListener); in testRun_simplePass() 174 InOrder inOrder = Mockito.inOrder(mListener); in testRun_simplePass() 175 inOrder.verify(mListener).testRunStarted(Mockito.eq(name), Mockito.eq(1)); in testRun_simplePass() 176 testPassExpectations(mListener, name, 1, inOrder); in testRun_simplePass() 177 inOrder.verify(mListener) in testRun_simplePass() [all …]
|
D | IsolatedHostTestTest.java | 64 @Mock ITestInvocationListener mListener; field in IsolatedHostTestTest 178 mHostTest.uploadTestArtifacts(artifactsDir, mListener); in testUploadReportArtifacts() 180 verify(mListener, times(2)).testLog((String) Mockito.any(), Mockito.any(), Mockito.any()); in testUploadReportArtifacts() 279 mHostTest.run(testInfo, mListener); in testSimpleFailingTestLifecycle() 281 verify(mListener).testRunStarted((String) Mockito.any(), Mockito.eq(1)); in testSimpleFailingTestLifecycle() 282 verify(mListener).testStarted(Mockito.eq(test), Mockito.anyLong()); in testSimpleFailingTestLifecycle() 283 verify(mListener).testFailed(Mockito.eq(test), (String) Mockito.any()); in testSimpleFailingTestLifecycle() 284 verify(mListener) in testSimpleFailingTestLifecycle() 287 verify(mListener) in testSimpleFailingTestLifecycle() 289 verify(mListener).testRunEnded(Mockito.anyLong(), Mockito.<HashMap<String, Metric>>any()); in testSimpleFailingTestLifecycle() [all …]
|
D | DeviceSuiteTest.java | 57 @Mock ITestInvocationListener mListener; field in DeviceSuiteTest 178 mHostTest.run(mTestInfo, mListener); in testRunDeviceSuite() 180 verify(mListener) in testRunDeviceSuite() 185 verify(mListener).testStarted(Mockito.eq(test1)); in testRunDeviceSuite() 186 verify(mListener).testEnded(Mockito.eq(test1), Mockito.eq(new HashMap<String, Metric>())); in testRunDeviceSuite() 187 verify(mListener).testStarted(Mockito.eq(test2)); in testRunDeviceSuite() 188 verify(mListener).testEnded(Mockito.eq(test2), Mockito.eq(new HashMap<String, Metric>())); in testRunDeviceSuite() 189 verify(mListener) in testRunDeviceSuite() 209 mHostTest.run(mTestInfo, mListener); in testRun_withFiltering() 211 verify(mListener) in testRun_withFiltering() [all …]
|
D | TestTimeoutEnforcerTest.java | 41 @Mock ITestInvocationListener mListener; field in TestTimeoutEnforcerTest 48 mEnforcer = new TestTimeoutEnforcer(500L, TimeUnit.MILLISECONDS, mListener); in setUp() 57 verify(mListener).testStarted(mTest, 0L); in testNoTimeout() 58 verify(mListener).testEnded(mTest, 250L, new HashMap<String, Metric>()); in testNoTimeout() 67 verify(mListener).testStarted(mTest, 0L); in testTimeout() 68 verify(mListener) in testTimeout() 74 verify(mListener).testEnded(mTest, 550L, new HashMap<String, Metric>()); in testTimeout() 84 verify(mListener).testStarted(mTest, 0L); in testFailedTest() 85 verify(mListener).testFailed(mTest, "i failed"); in testFailedTest() 86 verify(mListener).testEnded(mTest, 550L, new HashMap<String, Metric>()); in testFailedTest()
|
D | JarHostTestTest.java | 79 @Mock ITestInvocationListener mListener; field in JarHostTestTest 395 mTest.run(mTestInfo, mListener); in testCountTestFails() 397 verify(mListener).testRunStarted(HostTest.class.getName(), 0); in testCountTestFails() 398 verify(mListener).testRunFailed(captured.capture()); in testCountTestFails() 399 verify(mListener).testRunEnded(0L, new HashMap<String, Metric>()); in testCountTestFails() 418 mTest.run(mTestInfo, mListener); in testJarHostMetrics() 420 verify(mListener).testRunStarted(Mockito.any(), Mockito.eq(1)); in testJarHostMetrics() 421 verify(mListener).testStarted(Mockito.eq(tid)); in testJarHostMetrics() 422 verify(mListener) in testJarHostMetrics() 424 verify(mListener).testRunEnded(Mockito.anyLong(), Mockito.<HashMap<String, Metric>>any()); in testJarHostMetrics() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/junit4/ |
D | DeviceParameterizedRunnerTest.java | 107 @Mock ITestInvocationListener mListener; field in DeviceParameterizedRunnerTest 141 mTest.run(mTestInfo, mListener); in testRun() 143 InOrder inOrder = Mockito.inOrder(mListener); in testRun() 144 inOrder.verify(mListener).testRunStarted(TestJUnitParamsClass.class.getName(), 3); in testRun() 145 inOrder.verify(mListener).testStarted(test1); in testRun() 146 inOrder.verify(mListener).testEnded(test1, new HashMap<String, Metric>()); in testRun() 147 inOrder.verify(mListener).testStarted(test2_p1); in testRun() 148 inOrder.verify(mListener).testEnded(test2_p1, new HashMap<String, Metric>()); in testRun() 149 inOrder.verify(mListener).testStarted(test2_2); in testRun() 150 inOrder.verify(mListener).testEnded(test2_2, new HashMap<String, Metric>()); in testRun() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/suite/ |
D | ITestSuiteIntegrationTest.java | 105 private SuiteResultReporter mListener; field in ITestSuiteIntegrationTest 170 mListener = new SuiteResultReporter(); in setUp() 245 mListener.invocationStarted(mContext); in testSimplePassRun() 246 suite.run(mTestInfo, mListener); in testSimplePassRun() 247 mListener.invocationEnded(System.currentTimeMillis()); in testSimplePassRun() 249 assertEquals(2, mListener.getTotalModules()); in testSimplePassRun() 250 assertEquals(2, mListener.getCompleteModules()); in testSimplePassRun() 251 assertEquals(6, mListener.getTotalTests()); in testSimplePassRun() 252 assertEquals(6, mListener.getPassedTests()); in testSimplePassRun() 253 assertEquals(0, mListener.getFailedTests()); in testSimplePassRun() [all …]
|
D | RemoteTestTimeOutEnforcerTest.java | 47 private ModuleListener mListener; field in RemoteTestTimeOutEnforcerTest 66 mListener = in setUp() 69 new RemoteTestTimeOutEnforcer(mListener, mModuleDefinition, mIRemoteTest, mTimeout); in setUp() 76 mListener in testTimeout() 85 assertFalse(mListener.getCurrentRunResults().getRunFailureDescription().isRetriable()); in testTimeout() 91 assertNull(mListener.getCurrentRunResults().getRunFailureDescription()); in testNoTimeout()
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | NameMangleListener.java | 28 private final ITestInvocationListener mListener; field in NameMangleListener 34 mListener = listener; in NameMangleListener() 72 mListener.testEnded(mangledTestId, testMetrics); in testEnded() 79 mListener.testFailed(mangledTestId, trace); in testFailed() 86 mListener.testAssumptionFailure(mangledTestId, trace); in testAssumptionFailure() 93 mListener.testIgnored(mangledTestId); in testIgnored() 99 mListener.testRunEnded(elapsedTime, runMetrics); in testRunEnded() 107 mListener.testRunFailed(errorMessage); in testRunFailed() 116 mListener.testRunStarted(mangledName, testCount); in testRunStarted() 124 mListener.testRunStopped(elapsedTime); in testRunStopped() [all …]
|
D | BugreportCollector.java | 193 private ITestInvocationListener mListener; field in BugreportCollector 220 mListener = listener; in BugreportCollector() 288 mListener.testLog(logName, LogDataType.BUGREPORT, bugreport); in grabBugreport() 437 mListener.testEnded(test, testMetrics); in testEnded() 446 mListener.testFailed(test, trace); in testFailed() 455 mListener.testAssumptionFailure(test, trace); in testAssumptionFailure() 464 mListener.testRunEnded(elapsedTime, runMetrics); in testRunEnded() 474 mListener.testRunFailed(errorMessage); in testRunFailed() 484 mListener.testRunStarted(runName, testCount); in testRunStarted() 494 mListener.testRunStopped(elapsedTime); in testRunStopped() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/binary/ |
D | ExecutableTargetTestTest.java | 59 private ITestInvocationListener mListener = null; field in ExecutableTargetTestTest 68 mListener = Mockito.mock(ITestInvocationListener.class); in setUp() 97 mExecutableTargetTest.run(mTestInfo, mListener); in testRun_cmdSuccess() 98 Mockito.verify(mListener, Mockito.times(1)).testRunStarted(Mockito.any(), eq(2)); in testRun_cmdSuccess() 101 Mockito.verify(mListener, Mockito.times(1)).testStarted(Mockito.eq(testDescription)); in testRun_cmdSuccess() 102 Mockito.verify(mListener, Mockito.times(1)) in testRun_cmdSuccess() 108 Mockito.verify(mListener, Mockito.times(1)).testStarted(Mockito.eq(testDescription2)); in testRun_cmdSuccess() 109 Mockito.verify(mListener, Mockito.times(1)) in testRun_cmdSuccess() 113 Mockito.verify(mListener, Mockito.times(1)) in testRun_cmdSuccess() 140 mExecutableTargetTest.run(mTestInfo, mListener); in testRun_pathNotExist() [all …]
|
D | KernelTargetTestTest.java | 71 private ITestInvocationListener mListener = null; field in KernelTargetTestTest 81 mListener = Mockito.mock(ITestInvocationListener.class); in setUp() 100 mKernelTargetTest.checkCommandResult(mCommandResult, mListener, testDescription); in test_exitCodeSkip() 101 Mockito.verify(mListener, Mockito.times(1)).testIgnored(eq(testDescription)); in test_exitCodeSkip() 115 mKernelTargetTest.checkCommandResult(mCommandResult, mListener, testDescription); in test_mismatchedExitCodeSkip() 116 Mockito.verify(mListener, Mockito.never()).testIgnored(eq(testDescription)); in test_mismatchedExitCodeSkip() 129 mKernelTargetTest.checkCommandResult(mCommandResult, mListener, testDescription); in test_noExitCodeSkip() 130 Mockito.verify(mListener, Mockito.never()).testIgnored(eq(testDescription)); in test_noExitCodeSkip() 187 mKernelTargetTest.run(mTestInfo, mListener); 188 Mockito.verify(mListener, Mockito.times(1)).testRunStarted(any(), eq(2)); [all …]
|
D | KUnitModuleTestTest.java | 50 private ITestInvocationListener mListener = null; field in KUnitModuleTestTest 110 mListener = Mockito.mock(ITestInvocationListener.class); in setUp() 168 mKUnitModuleTest.run(mTestInfo, mListener); in test_success() 175 Mockito.verify(mListener, Mockito.times(1)).testRunStarted(Mockito.any(), eq(2)); in test_success() 177 Mockito.verify(mListener, Mockito.times(1)).testStarted(Mockito.eq(testDescription)); in test_success() 178 Mockito.verify(mListener, Mockito.times(1)) in test_success() 184 Mockito.verify(mListener, Mockito.times(1)) in test_success() 207 mKUnitModuleTest.run(mTestInfo, mListener); in test_module_load_fail() 217 Mockito.verify(mListener, Mockito.times(1)).testRunStarted(Mockito.any(), eq(2)); in test_module_load_fail() 219 Mockito.verify(mListener, Mockito.times(1)).testStarted(Mockito.eq(testResult.first)); in test_module_load_fail() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/ |
D | ClangCodeCoverageCollectorTest.java | 124 ClangCodeCoverageCollector mListener; field in ClangCodeCoverageCollectorTest 152 mListener = new ClangCodeCoverageCollector(); in setUp() 153 mListener.setConfiguration(mMockConfiguration); in setUp() 154 mListener.setRunUtil(mCommandArgumentCaptor); in setUp() 166 mListener.init(mMockContext, mFakeListener); in coverageDisabled_noCoverageLog() 169 mListener.testRunStarted(RUN_NAME, TEST_COUNT); in coverageDisabled_noCoverageLog() 170 mListener.testRunEnded(ELAPSED_TIME, mMetrics); in coverageDisabled_noCoverageLog() 171 mListener.invocationEnded(ELAPSED_TIME); in coverageDisabled_noCoverageLog() 181 mListener.init(mMockContext, mFakeListener); in clangCoverageDisabled_noCoverageLog() 184 mListener.testRunStarted(RUN_NAME, TEST_COUNT); in clangCoverageDisabled_noCoverageLog() [all …]
|
/tools/tradefederation/contrib/tests/src/com/android/uicd/tests/ |
D | UiConductorTestTest.java | 85 @Mock private ITestInvocationListener mListener; field in UiConductorTestTest 137 mTest.run(mTestInfo, mListener); in testRun() 147 verify(mListener).testStarted(eq(test), anyLong()); in testRun() 148 verify(mListener, never()).testFailed(any(), anyString()); in testRun() 149 verify(mListener).testEnded(eq(test), anyLong(), anyMap()); in testRun() 155 mTest.run(mTestInfo, mListener); in testRun_cliNotFound() 162 mTest.run(mTestInfo, mListener); in testRun_timeout() 163 verify(mListener).testFailed(any(), anyString()); in testRun_timeout() 170 mTest.run(mTestInfo, mListener); in testRun_error() 171 verify(mListener).testFailed(any(), anyString()); in testRun_error() [all …]
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
D | TestRunHelper.java | 32 private ITestInvocationListener mListener; field in TestRunHelper 36 mListener = listener; in TestRunHelper() 46 mListener.testRunFailed(errMsg); in reportFailure() 47 mListener.testFailed(mTestId, errMsg); in reportFailure() 48 mListener.testEnded(mTestId, new HashMap<String, Metric>()); in reportFailure() 55 … mListener.testRunEnded(getTotalTestTime(), TfMetricProtoUtil.upgradeConvert(resultDictionary)); in endTest() 56 mListener.testEnded(mTestId, TfMetricProtoUtil.upgradeConvert(resultDictionary)); in endTest() 60 mListener.testRunStarted(mTestId.getTestName(), numberOfTests); in startTest() 61 mListener.testStarted(mTestId); in startTest()
|
D | CameraTestMetricsCollectionListener.java | 38 private ITestInvocationListener mListener; field in CameraTestMetricsCollectionListener.AbstractCameraTestMetricsCollectionListener 47 mListener = listener; in AbstractCameraTestMetricsCollectionListener() 66 mListener.testEnded(test, endTime, testMetrics); in testEnded() 73 mListener.testStarted(test, startTime); in testStarted() 85 mListener.testFailed(test, trace); in testFailed() 104 handleTestRunEnded(mListener, elapsedTime, TfMetricProtoUtil.compatibleConvert(runMetrics)); in testRunEnded() 112 mListener.testRunStarted(runName, testCount); in testRunStarted() 118 mListener.testRunStarted(runName, testCount, attemptNumber); in testRunStarted() 125 mListener.testRunStarted(runName, testCount, attemptNumber, startTime); in testRunStarted() 131 mListener.testRunStopped(elapsedTime); in testRunStopped() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/invoker/shard/ |
D | TestsPoolPollerTest.java | 66 private ITestInvocationListener mListener; field in TestsPoolPollerTest 75 mListener = Mockito.mock(ITestInvocationListener.class); in setUp() 140 poller.run(mTestInfo, mListener); in testPollingRun() 141 Mockito.verify(mListener, Mockito.times(numTests)) in testPollingRun() 144 Mockito.verify(mListener, Mockito.times(numTests)) in testPollingRun() 176 poller.run(mTestInfo, mListener); in testRun_runtimeException() 177 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_runtimeException() 179 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_runtimeException() 208 poller.run(mTestInfo, mListener); in testRun_deviceUnresponsive() 209 Mockito.verify(mListener, Mockito.times(numTests)) in testRun_deviceUnresponsive() [all …]
|
/tools/tradefederation/contrib/tests/src/com/android/continuous/ |
D | SmokeTestTest.java | 29 private ITestInvocationListener mListener = null; field in SmokeTestTest 33 mListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 37 TrimListener trim = new TrimListener(mListener); in testRewrite() 44 mListener.testStarted(EasyMock.eq(out)); in testRewrite() 46 EasyMock.replay(mListener); in testRewrite() 48 EasyMock.verify(mListener); in testRewrite()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/junit4/ |
D | JUnit4ResultForwarder.java | 51 private ITestInvocationListener mListener; field in JUnit4ResultForwarder 60 mListener = listener; in JUnit4ResultForwarder() 97 mListener.testRunFailed(failureDesc); in testFailure() 128 mListener.testStarted(testid); in testRunFinished() 129 mListener.testAssumptionFailure(testid, stack); in testRunFinished() 130 mListener.testEnded(testid, new HashMap<String, Metric>()); in testRunFinished() 135 mListener.testRunFailed(stack); in testRunFinished() 150 mListener.testStarted(testid); in testStarted() 182 mListener.testEnded(testid, metrics); in testFinished() 200 mListener.testStarted(testid); in testIgnored() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 44 @Mock ITestInvocationListener mListener; field in DeviceFileReporterTest 78 new DeviceFileReporter(mDevice, mListener) { in setUp() 102 verify(mListener) in testSimple() 127 verify(mListener) in testTrim() 158 verify(mListener) in testLine_containingSpace() 161 verify(mListener) in testLine_containingSpace() 166 verify(mListener) in testLine_containingSpace() 197 verify(mListener) in testLineEnding_LF() 229 verify(mListener) in testLineEnding_CRLF() 256 new DeviceFileReporter(mDevice, mListener) { in testRepeat_skip() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | SubprocessTestResultsParser.java | 87 private ITestInvocationListener mListener; field in SubprocessTestResultsParser 281 mListener = listener; in SubprocessTestResultsParser() 394 mListener.testRunStarted( in handleEvent() 397 mListener.testRunStarted(rsi.mRunName, rsi.mTestCount); in handleEvent() 408 mListener.testRunFailed(rfi.mFailure); in handleEvent() 410 mListener.testRunFailed(rfi.mReason); in handleEvent() 421 mListener.testRunEnded( in handleEvent() 436 mListener.invocationFailed(ifi.mFailure); in handleEvent() 438 mListener.invocationFailed(ifi.mCause); in handleEvent() 450 mListener.testStarted(mCurrentTestCase, bti.mStartTime); in handleEvent() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/result/proto/ |
D | ProtoResultParser.java | 75 private ITestInvocationListener mListener; field in ProtoResultParser 120 mListener = listener; in ProtoResultParser() 226 mListener.testLog("failed-result-protobuf", LogDataType.PB, protoFail); in processFileProto() 260 mListener.testRunStarted(getModuleInProgress(), 0); in completeModuleEvents() 266 mListener.testFailed(mCurrentTestCase, failure); in completeModuleEvents() 267 mListener.testEnded(mCurrentTestCase, new HashMap<String, Metric>()); in completeModuleEvents() 274 mListener.testRunFailed(failure); in completeModuleEvents() 275 mListener.testRunEnded(0L, new HashMap<String, Metric>()); in completeModuleEvents() 279 mListener.testModuleEnded(); in completeModuleEvents() 295 mListener.testStarted(description, timeStampToMillis(childProto.getStartTime())); in evalProto() [all …]
|
/tools/tradefederation/contrib/tests/src/com/android/scenario/ |
D | AppSetupTest.java | 52 @Mock ITestInvocationListener mListener; field in AppSetupTest 68 mAppSetup.run(mTestInfo, mListener); in testDropCachesOption_set() 75 mAppSetup.run(mTestInfo, mListener); in testDropCachesOption_notSet() 84 mAppSetup.run(mTestInfo, mListener); in testKillAppsOption() 98 mAppSetup.run(mTestInfo, mListener); in testDisableOption() 113 mAppSetup.run(mTestInfo, mListener); in testDefaultsToUsingScenariosPackage() 128 mAppSetup.run(mTestInfo, mListener); in testSupportsExplicitPackageName()
|