/tools/tradefederation/core/tests/src/com/android/tradefed/result/proto/ |
D | ProtoResultParserTest.java | 54 private ILogSaverListener mMockListener; field in ProtoResultParserTest 117 mMockListener = EasyMock.createStrictMock(ILogSaverListener.class); in setUp() 119 mParser = new ProtoResultParser(mMockListener, mMainInvocationContext, true); in setUp() 145 mMockListener.invocationStarted(EasyMock.anyObject()); in testEvents() 147 mMockListener.testModuleStarted(EasyMock.anyObject()); in testEvents() 148 mMockListener.testRunStarted( in testEvents() 150 mMockListener.testStarted(test1, 5L); in testEvents() 151 mMockListener.testEnded(test1, 10L, new HashMap<String, Metric>()); in testEvents() 153 mMockListener.testStarted(test2, 11L); in testEvents() 154 mMockListener.testFailed(test2, "I failed"); in testEvents() [all …]
|
D | StreamProtoResultReporterTest.java | 49 private ITestInvocationListener mMockListener; field in StreamProtoResultReporterTest 57 mMockListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp() 63 new StreamProtoReceiver(mMockListener, mMainInvocationContext, true); in testStream() 73 mMockListener.invocationStarted(EasyMock.anyObject()); in testStream() 75 mMockListener.testModuleStarted(EasyMock.anyObject()); in testStream() 76 mMockListener.testRunStarted( in testStream() 78 mMockListener.testStarted(test1, 5L); in testStream() 79 mMockListener.testEnded(test1, 10L, new HashMap<String, Metric>()); in testStream() 81 mMockListener.testStarted(test2, 11L); in testStream() 82 mMockListener.testFailed(test2, "I failed"); in testStream() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | NoisyDryRunTestTest.java | 57 private ITestInvocationListener mMockListener; field in NoisyDryRunTestTest 73 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 86 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseFile", 1); in testRun() 87 mMockListener.testStarted(anyObject()); in testRun() 88 mMockListener.testEnded(anyObject(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun() 89 mMockListener.testRunEnded(EasyMock.eq(0l), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun() 91 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseCommands", in testRun() 93 mMockListener.testStarted(anyObject()); in testRun() 94 mMockListener.testEnded(anyObject(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun() 95 mMockListener.testStarted(anyObject()); in testRun() [all …]
|
D | PythonUnitTestResultParserTest.java | 59 private ITestInvocationListener mMockListener; field in PythonUnitTestResultParserTest 63 mMockListener = createMock(ITestInvocationListener.class); in setUp() 64 mParser = new PythonUnitTestResultParser(ArrayUtil.list(mMockListener), "test"); in setUp() 132 replay(mMockListener); in testParseNoTests() 134 verify(mMockListener); in testParseNoTests() 152 replay(mMockListener); in testParseSingleTestPass() 154 verify(mMockListener); in testParseSingleTestPass() 172 replay(mMockListener); in testParseSingleTestPassWithExpectedFailure() 174 verify(mMockListener); in testParseSingleTestPassWithExpectedFailure() 193 replay(mMockListener); in testParseMultiTestPass() [all …]
|
D | InstrumentationTestTest.java | 100 @Mock ITestInvocationListener mMockListener; field in InstrumentationTestTest 164 mInstrumentationTest.run(mMockListener); in testRun() 166 InOrder inOrder = Mockito.inOrder(mInstrumentationTest, mMockTestDevice, mMockListener); in testRun() 173 inOrder.verify(mMockListener).testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun() 174 inOrder.verify(mMockListener).testStarted(eq(TEST1), anyLong()); in testRun() 175 inOrder.verify(mMockListener).testEnded(eq(TEST1), anyLong(), eq(EMPTY_STRING_MAP)); in testRun() 176 inOrder.verify(mMockListener).testStarted(eq(TEST2), anyLong()); in testRun() 177 inOrder.verify(mMockListener).testEnded(eq(TEST2), anyLong(), eq(EMPTY_STRING_MAP)); in testRun() 178 inOrder.verify(mMockListener).testRunEnded(1, EMPTY_STRING_MAP); in testRun() 186 mInstrumentationTest.run(mMockListener); in testRun_bothAbi() [all …]
|
D | InstrumentationFileTestTest.java | 63 private ITestInvocationListener mMockListener; field in InstrumentationFileTestTest 74 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 135 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 1); in testRun_singleSuccessfulTest() 136 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun_singleSuccessfulTest() 137 mMockListener.testEnded( in testRun_singleSuccessfulTest() 139 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.eq(new HashMap<String, Metric>())); in testRun_singleSuccessfulTest() 141 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_singleSuccessfulTest() 142 mInstrumentationFileTest.run(mMockListener); in testRun_singleSuccessfulTest() 224 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun_reRunOneFailedToCompleteTest() 226 mMockListener.testStarted(EasyMock.eq(test1), EasyMock.anyLong()); in testRun_reRunOneFailedToCompleteTest() [all …]
|
D | TfTestLauncherTest.java | 60 private ITestInvocationListener mMockListener; field in TfTestLauncherTest 67 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 133 mMockListener.testLog((String)EasyMock.anyObject(), (LogDataType)EasyMock.anyObject(), in testRun() 137 mMockListener.testRunStarted("temporaryFiles", 1); in testRun() 138 mMockListener.testRunStarted("StdErr", 1); in testRun() 140 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in testRun() 141 mMockListener.testEnded( in testRun() 144 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun() 146 mMockListener.testRunStarted("elapsed-time", 1); in testRun() 147 mMockListener.testStarted(EasyMock.anyObject()); in testRun() [all …]
|
D | InstrumentationSerialTestTest.java | 46 private ITestInvocationListener mMockListener; field in InstrumentationSerialTestTest 51 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 86 mMockListener.testRunStarted(packageName, 0, 1); in testRun() 87 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun() 88 mMockListener.testEnded( in testRun() 90 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun() 92 EasyMock.replay(mMockListener, mMockTestDevice); in testRun() 93 mInstrumentationSerialTest.run(mMockListener); in testRun() 97 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 132 mMockListener.testRunStarted(packageName, 0); in testRun_runFailure() [all …]
|
D | GTestFuncTest.java | 38 private ITestInvocationListener mMockListener = null; field in GTestFuncTest 54 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 65 mMockListener.testRunStarted(NATIVE_SAMPLETEST_MODULE_NAME, 7); in testRun() 79 mMockListener.testStarted(id); in testRun() 82 mMockListener.testFailed( in testRun() 86 mMockListener.testEnded(id, emptyMap); in testRun() 88 mMockListener.testRunEnded( in testRun() 90 EasyMock.replay(mMockListener); in testRun() 91 mGTest.run(mMockListener); in testRun() 92 EasyMock.verify(mMockListener); in testRun() [all …]
|
D | VersionedTfLauncherTest.java | 73 private ITestInvocationListener mMockListener; field in VersionedTfLauncherTest 82 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 158 mMockListener.testLog((String)EasyMock.anyObject(), (LogDataType)EasyMock.anyObject(), in testRun_singleDevice() 161 mMockListener.testRunStarted("StdErr", 1); in testRun_singleDevice() 162 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in testRun_singleDevice() 163 mMockListener.testEnded( in testRun_singleDevice() 165 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun_singleDevice() 168 EasyMock.replay(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice() 169 mVersionedTfLauncher.run(mMockListener); in testRun_singleDevice() 170 EasyMock.verify(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice() [all …]
|
D | InstalledInstrumentationsTestTest.java | 54 private ITestInvocationListener mMockListener; field in InstalledInstrumentationsTestTest 62 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 74 mMockListener.testRunStarted(TEST_PKG, 0); in testRun() 76 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.capture(captureMetrics)); in testRun() 80 EasyMock.replay(mMockTestDevice, mMockListener); in testRun() 81 mInstalledInstrTest.run(mMockListener); in testRun() 84 assertEquals(mMockListener, mockInstrumentationTest.getListener()); in testRun() 97 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 122 EasyMock.replay(mMockTestDevice, mMockListener); in testShardedRun() 135 shard0.run(mMockListener); in testShardedRun() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/retry/ |
D | ResultsPlayerTest.java | 45 private ITestInvocationListener mMockListener; field in ResultsPlayerTest 53 mMockListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp() 71 mMockListener.testRunStarted("run1", 2); in testReplay() 73 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testReplay() 74 mMockListener.testEnded( in testReplay() 77 mMockListener.testStarted(EasyMock.eq(testFail), EasyMock.anyLong()); in testReplay() 78 mMockListener.testFailed(testFail, "fail0"); in testReplay() 79 mMockListener.testEnded( in testReplay() 83 mMockListener.testRunEnded(500L, new HashMap<String, Metric>()); in testReplay() 85 EasyMock.replay(mMockListener, mMockDevice); in testReplay() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | JUnitXmlParserTest.java | 44 private ITestInvocationListener mMockListener; field in JUnitXmlParserTest 48 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 55 new JUnitXmlParser(mMockListener).parse(new ByteArrayInputStream(new byte[0])); in testEmptyParse() 65 mMockListener.testRunStarted("runName", 3); in testParse() 67 mMockListener.testStarted(test1); in testParse() 68 mMockListener.testEnded(test1, new HashMap<String, Metric>()); in testParse() 71 mMockListener.testStarted(test2); in testParse() 72 mMockListener.testEnded(test2, new HashMap<String, Metric>()); in testParse() 75 mMockListener.testStarted(test3); in testParse() 76 mMockListener.testFailed( in testParse() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | BaseDeviceMetricCollectorTest.java | 54 private ITestInvocationListener mMockListener; field in BaseDeviceMetricCollectorTest 62 mMockListener = Mockito.mock(ITestInvocationListener.class); in setUp() 67 mBase.init(mContext, mMockListener); in testInitAndForwarding() 83 Mockito.verify(mMockListener, times(1)).invocationStarted(Mockito.any()); in testInitAndForwarding() 84 Mockito.verify(mMockListener, times(1)).testRunStarted("testRun", 1); in testInitAndForwarding() 85 Mockito.verify(mMockListener, times(1)).testStarted(Mockito.eq(test), Mockito.anyLong()); in testInitAndForwarding() 86 Mockito.verify(mMockListener, times(1)) in testInitAndForwarding() 88 Mockito.verify(mMockListener, times(1)).testFailed(test, "trace"); in testInitAndForwarding() 89 Mockito.verify(mMockListener, times(1)).testAssumptionFailure(test, "trace"); in testInitAndForwarding() 90 Mockito.verify(mMockListener, times(1)).testIgnored(test); in testInitAndForwarding() [all …]
|
D | LogcatOnFailureCollectorTest.java | 45 private ITestInvocationListener mMockListener; field in LogcatOnFailureCollectorTest 84 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 99 mMockListener.testRunStarted("runName", 1); in testCollect() 101 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testCollect() 102 mMockListener.testFailed(EasyMock.eq(test), EasyMock.anyObject()); in testCollect() 103 mMockListener.testEnded( in testCollect() 107 mMockListener.testRunEnded(0L, new HashMap<String, Metric>()); in testCollect() 114 mMockListener.testLog( in testCollect() 119 EasyMock.replay(mMockListener, mMockDevice, mMockReceiver); in testCollect() 120 mTestListener = mCollector.init(mContext, mMockListener); in testCollect() [all …]
|
D | FilePullerLogCollectorTest.java | 47 private ITestInvocationListener mMockListener; field in FilePullerLogCollectorTest 53 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 68 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testPullAndLog() 75 mMockListener.testStarted(test, 0L); in testPullAndLog() 79 mMockListener.testLog( in testPullAndLog() 81 mMockListener.testEnded(EasyMock.eq(test), EasyMock.eq(50L), EasyMock.capture(capture)); in testPullAndLog() 83 EasyMock.replay(mMockDevice, mMockListener); in testPullAndLog() 86 EasyMock.verify(mMockDevice, mMockListener); in testPullAndLog() 103 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testSkipTestCollection() 110 mMockListener.testStarted(test, 0L); in testSkipTestCollection() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | ModuleDefinitionTest.java | 96 private ITestInvocationListener mMockListener; field in ModuleDefinitionTest 270 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 300 EasyMock.replay(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in replayMocks() 315 EasyMock.verify(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in verifyMocks() 346 mMockListener.testRunStarted( in testRun() 348 mMockListener.testRunEnded( in testRun() 351 mModule.run(mMockListener); in testRun() 375 mMockListener.testRunStarted( in testRun_tearDownException() 377 mMockListener.testRunFailed("teardown failed"); in testRun_tearDownException() 378 mMockListener.testRunEnded( in testRun_tearDownException() [all …]
|
D | ITestSuiteTest.java | 101 private ITestInvocationListener mMockListener; field in ITestSuiteTest 267 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 341 EasyMock.replay(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in replayMocks() 348 EasyMock.verify(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in verifyMocks() 412 expectTestRun(mMockListener); in testRun() 414 mTestSuite.run(mMockListener); in testRun() 439 expectTestRun(mMockListener); in testRun_whiteListPreparer() 441 mTestSuite.run(mMockListener); in testRun_whiteListPreparer() 463 EasyMock.anyObject(), EasyMock.same(mMockListener))) in testRun_failedSystemChecker() 468 expectTestRun(mMockListener); in testRun_failedSystemChecker() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | LogcatCrashResultForwarderTest.java | 33 private ITestInvocationListener mMockListener; field in LogcatCrashResultForwarderTest 38 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 46 mReporter = new LogcatCrashResultForwarder(mMockDevice, mMockListener); in testCaptureTestCrash_noCrashInLogcat() 49 mMockListener.testStarted(test, 0L); in testCaptureTestCrash_noCrashInLogcat() 52 mMockListener.testFailed(test, "instrumentation failed. reason: 'Process crashed.'"); in testCaptureTestCrash_noCrashInLogcat() 53 mMockListener.testEnded(test, 5L, new HashMap<String, Metric>()); in testCaptureTestCrash_noCrashInLogcat() 55 EasyMock.replay(mMockListener, mMockDevice); in testCaptureTestCrash_noCrashInLogcat() 59 EasyMock.verify(mMockListener, mMockDevice); in testCaptureTestCrash_noCrashInLogcat() 69 mReporter = new LogcatCrashResultForwarder(mMockDevice, mMockListener); in testCaptureTestCrash_oneCrashingLogcat() 72 mMockListener.testStarted(test, 0L); in testCaptureTestCrash_oneCrashingLogcat() [all …]
|
D | BugreportCollectorTest.java | 42 private ITestInvocationListener mMockListener = null; field in BugreportCollectorTest 73 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 78 mCollector = new BugreportCollector(mMockListener, mMockDevice); in setUp() 158 setListenerTestRunExpectations(mMockListener, "runName", "testName"); in testPassThrough() 173 setListenerTestRunExpectations(mMockListener, "runName1", "testName1", true /*failed*/); in testTestFailed() 174 mMockListener.testLog(EasyMock.contains("bug-FAILED-FooTest__testName1."), in testTestFailed() 176 setListenerTestRunExpectations(mMockListener, "runName2", "testName2", true /*failed*/); in testTestFailed() 177 mMockListener.testLog(EasyMock.contains("bug-FAILED-FooTest__testName2."), in testTestFailed() 194 setListenerTestRunExpectations(mMockListener, "runName1", "testName1"); in testTestEnded() 195 mMockListener.testLog(EasyMock.contains("bug-FooTest__testName1."), in testTestEnded() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | ShardListenerTest.java | 43 private ITestInvocationListener mMockListener; field in ShardListenerTest 50 mMockListener = EasyMock.createMock(ILogSaverListener.class); in setUp() 52 mShardListener = new ShardListener(mMockListener); in setUp() 63 mMockListener.invocationStarted(mContext); in testBufferAndReplay() 64 mMockListener.testRunStarted("run1", 1); in testBufferAndReplay() 66 mMockListener.testStarted(tid, 0l); in testBufferAndReplay() 67 mMockListener.testEnded(tid, 0l, new HashMap<String, Metric>()); in testBufferAndReplay() 68 mMockListener.testRunEnded(0l, new HashMap<String, Metric>()); in testBufferAndReplay() 69 mMockListener.invocationEnded(0l); in testBufferAndReplay() 71 EasyMock.replay(mMockListener, mMockDevice); in testBufferAndReplay() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/binary/ |
D | ExecutableHostTestTest.java | 53 private ITestInvocationListener mMockListener; field in ExecutableHostTestTest 59 mMockListener = Mockito.mock(ITestInvocationListener.class); in setUp() 74 mExecutableTest.run(mMockListener); in testRunHostExecutable_noBinaries() 76 verify(mMockListener, times(0)).testRunStarted(any(), anyInt()); in testRunHostExecutable_noBinaries() 85 mExecutableTest.run(mMockListener); in testRunHostExecutable_doesNotExists() 87 verify(mMockListener, Mockito.times(1)).testRunStarted(eq("test"), eq(0)); in testRunHostExecutable_doesNotExists() 88 verify(mMockListener, Mockito.times(1)) in testRunHostExecutable_doesNotExists() 90 verify(mMockListener, Mockito.times(1)) in testRunHostExecutable_doesNotExists() 106 mExecutableTest.run(mMockListener); in testRunHostExecutable() 108 verify(mMockListener, Mockito.times(1)).testRunStarted(eq(tmpBinary.getName()), eq(1)); in testRunHostExecutable() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ddmlib/ |
D | TestRunToTestInvocationForwarderTest.java | 39 private ITestLifeCycleReceiver mMockListener; field in TestRunToTestInvocationForwarderTest 43 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 44 mForwarder = new TestRunToTestInvocationForwarder(mMockListener); in setUp() 53 mMockListener.testRunStarted(RUN_NAME, 2); in testForwarding() 55 mMockListener.testStarted(td1); in testForwarding() 56 mMockListener.testFailed(td1, "I failed"); in testForwarding() 57 mMockListener.testEnded(td1, new HashMap<String, Metric>()); in testForwarding() 59 mMockListener.testStarted(td2); in testForwarding() 60 mMockListener.testFailed(td2, "I failed"); in testForwarding() 61 mMockListener.testEnded(td2, new HashMap<String, Metric>()); in testForwarding() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/ |
D | CommandFileWatcherTest.java | 38 private ICommandFileListener mMockListener = null; field in CommandFileWatcherTest 47 mMockListener = EasyMock.createStrictMock(ICommandFileListener.class); in setUp() 48 mWatcher = new CommandFileWatcher(mMockListener); in setUp() 58 mMockListener.notifyFileChanged(cmdFile, EMPTY_ARGS); in testImmediateChange() 59 EasyMock.replay(mMockListener); in testImmediateChange() 63 EasyMock.verify(mMockListener); in testImmediateChange() 72 EasyMock.replay(mMockListener); in testNoChange() 75 EasyMock.verify(mMockListener); in testNoChange() 87 mMockListener.notifyFileChanged(cmdFile2, EMPTY_ARGS); in testMultipleCmdFiles() 88 EasyMock.replay(mMockListener); in testMultipleCmdFiles() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/python/ |
D | PythonBinaryHostTestTest.java | 48 private ITestInvocationListener mMockListener; field in PythonBinaryHostTestTest 56 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 100 mMockListener.testRunStarted(binary.getName(), 5); in testRun() 101 mMockListener.testLog( in testRun() 107 EasyMock.replay(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun() 108 mTest.run(mMockListener); in testRun() 109 EasyMock.verify(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun() 140 mMockListener.testRunStarted(binary.getName(), 5); in testRun_withAdbPath() 141 mMockListener.testLog( in testRun_withAdbPath() 147 EasyMock.replay(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun_withAdbPath() [all …]
|