/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | JUnitXmlParserTest.java | 43 private ITestInvocationListener mMockListener; field in JUnitXmlParserTest 48 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 49 mParser = new JUnitXmlParser(mMockListener); in setUp() 66 mMockListener.testRunStarted("suiteName", 3); in testParse() 68 mMockListener.testStarted(test1); in testParse() 69 mMockListener.testEnded(test1, new HashMap<String, Metric>()); in testParse() 72 mMockListener.testStarted(test2); in testParse() 73 mMockListener.testEnded(test2, new HashMap<String, Metric>()); in testParse() 76 mMockListener.testStarted(test3); in testParse() 77 mMockListener.testFailed( in testParse() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | NoisyDryRunTestTest.java | 45 private ITestInvocationListener mMockListener; field in NoisyDryRunTestTest 50 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 62 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseFile", 1); in testRun() 63 mMockListener.testStarted(EasyMock.anyObject()); in testRun() 64 mMockListener.testEnded( in testRun() 66 mMockListener.testRunEnded(EasyMock.eq(0l), (HashMap<String, Metric>) EasyMock.anyObject()); in testRun() 68 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseCommands", in testRun() 70 mMockListener.testStarted(EasyMock.anyObject()); in testRun() 71 mMockListener.testEnded( in testRun() 73 mMockListener.testStarted(EasyMock.anyObject()); in testRun() [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 | TfTestLauncherTest.java | 58 private ITestInvocationListener mMockListener; field in TfTestLauncherTest 65 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 122 mMockListener.testLog((String)EasyMock.anyObject(), (LogDataType)EasyMock.anyObject(), in testRun() 126 mMockListener.testRunStarted("temporaryFiles", 1); in testRun() 127 mMockListener.testRunStarted("StdErr", 1); in testRun() 129 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in testRun() 130 mMockListener.testEnded( in testRun() 133 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun() 135 mMockListener.testRunStarted("elapsed-time", 1); in testRun() 136 mMockListener.testStarted(EasyMock.anyObject()); in testRun() [all …]
|
D | InstrumentationFileTestTest.java | 56 private ITestInvocationListener mMockListener; field in InstrumentationFileTestTest 69 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 130 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 1); in testRun_singleSuccessfulTest() 131 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun_singleSuccessfulTest() 132 mMockListener.testEnded( in testRun_singleSuccessfulTest() 134 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun_singleSuccessfulTest() 136 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_singleSuccessfulTest() 137 mInstrumentationFileTest.run(mMockListener); in testRun_singleSuccessfulTest() 215 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun_reRunOneFailedToCompleteTest() 217 mMockListener.testStarted(EasyMock.eq(test1), EasyMock.anyLong()); in testRun_reRunOneFailedToCompleteTest() [all …]
|
D | InstrumentationTestTest.java | 84 @Mock ITestInvocationListener mMockListener; field in InstrumentationTestTest 147 mInstrumentationTest.run(mMockListener); in testRun() 149 InOrder inOrder = Mockito.inOrder(mInstrumentationTest, mMockTestDevice, mMockListener); in testRun() 156 inOrder.verify(mMockListener).testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun() 157 inOrder.verify(mMockListener).testStarted(eq(TEST1), anyLong()); in testRun() 158 inOrder.verify(mMockListener).testEnded(eq(TEST1), anyLong(), eq(EMPTY_STRING_MAP)); in testRun() 159 inOrder.verify(mMockListener).testStarted(eq(TEST2), anyLong()); in testRun() 160 inOrder.verify(mMockListener).testEnded(eq(TEST2), anyLong(), eq(EMPTY_STRING_MAP)); in testRun() 161 inOrder.verify(mMockListener).testRunEnded(1, EMPTY_STRING_MAP); in testRun() 169 mInstrumentationTest.run(mMockListener); in testRun_bothAbi() [all …]
|
D | InstrumentationSerialTestTest.java | 47 private ITestInvocationListener mMockListener; field in InstrumentationSerialTestTest 52 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 87 mMockListener.testRunStarted(packageName, 1); in testRun() 88 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun() 89 mMockListener.testEnded( in testRun() 91 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun() 93 EasyMock.replay(mMockListener, mMockTestDevice); in testRun() 94 mInstrumentationSerialTest.run(mMockListener); in testRun() 98 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 133 mMockListener.testRunStarted(packageName, 1); in testRun_runFailure() [all …]
|
D | PythonUnitTestRunnerTest.java | 128 private ITestInvocationListener mMockListener; field in PythonUnitTestRunnerTest 133 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 184 mMockListener.testRunStarted((String) EasyMock.anyObject(), EasyMock.anyInt()); in setMockListenerExpectTestPass() 186 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in setMockListenerExpectTestPass() 189 mMockListener.testFailed( in setMockListenerExpectTestPass() 193 mMockListener.testEnded( in setMockListenerExpectTestPass() 198 mMockListener.testRunFailed((String) EasyMock.anyObject()); in setMockListenerExpectTestPass() 201 mMockListener.testRunEnded( in setMockListenerExpectTestPass() 211 EasyMock.replay(mMockListener, mockRunUtil); in testRunPass() 212 mRunner.doRunTest(mMockListener, mockRunUtil, ""); in testRunPass() [all …]
|
D | InstalledInstrumentationsTestTest.java | 45 private ITestInvocationListener mMockListener; field in InstalledInstrumentationsTestTest 58 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 71 mMockListener.testRunStarted(TEST_PKG, 0); in testRun() 73 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.capture(captureMetrics)); in testRun() 77 EasyMock.replay(mMockTestDevice, mMockListener); in testRun() 78 mInstalledInstrTest.run(mMockListener); in testRun() 81 assertEquals(mMockListener, mockInstrumentationTest.getListener()); in testRun() 94 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 120 EasyMock.replay(mMockTestDevice, mMockListener); in testShardedRun() 133 shard0.run(mMockListener); in testShardedRun() [all …]
|
D | VersionedTfLauncherTest.java | 70 private ITestInvocationListener mMockListener; field in VersionedTfLauncherTest 79 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 148 mMockListener.testLog((String)EasyMock.anyObject(), (LogDataType)EasyMock.anyObject(), in testRun_singleDevice() 151 mMockListener.testRunStarted("StdErr", 1); in testRun_singleDevice() 152 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in testRun_singleDevice() 153 mMockListener.testEnded( in testRun_singleDevice() 155 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun_singleDevice() 158 EasyMock.replay(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice() 159 mVersionedTfLauncher.run(mMockListener); in testRun_singleDevice() 160 EasyMock.verify(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice() [all …]
|
D | NativeStressTestTest.java | 39 private ITestInvocationListener mMockListener; field in NativeStressTestTest 52 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 55 mMockListener.testRunStarted(RUN_NAME, 0); in setUp() 56 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.capture(mCapturedMetricMap)); in setUp() 75 mNativeTest.run(mMockListener); in testRun_missingIterations() 91 mNativeTest.run(mMockListener); in testRun() 109 mNativeTest.run(mMockListener); in testRun_twoRuns() 125 mNativeTest.run(mMockListener); in testRun_deviceNotAvailable() 134 EasyMock.replay(mMockListener, mMockDevice, mMockStressFile); in replayMocks() 138 EasyMock.verify(mMockListener, mMockDevice); in verifyMocks()
|
D | InstrumentationTestFuncTest.java | 60 private ITestInvocationListener mMockListener; field in InstrumentationTestFuncTest 81 mMockListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp() 96 mMockListener.testRunStarted(TestAppConstants.TESTAPP_PACKAGE, 1); in testRun() 97 mMockListener.testStarted(EasyMock.eq(expectedTest)); in testRun() 98 mMockListener.testEnded( in testRun() 100 mMockListener.testRunEnded( in testRun() 102 EasyMock.replay(mMockListener); in testRun() 103 mInstrumentationTest.run(mMockListener); in testRun() 104 EasyMock.verify(mMockListener); in testRun() 139 mMockListener.testRunStarted(TestAppConstants.TESTAPP_PACKAGE, 1); in testRun_testCrash() [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 | SubprocessResultsReporterTest.java | 107 ITestInvocationListener mMockListener = EasyMock.createMock(ITestInvocationListener.class); in testPrintEvent_printToSocket() local 109 new SubprocessTestResultsParser(mMockListener, true, new InvocationContext()); in testPrintEvent_printToSocket() 115 mMockListener.testIgnored(testId); in testPrintEvent_printToSocket() 116 mMockListener.testAssumptionFailure(testId, "fake trace"); in testPrintEvent_printToSocket() 117 mMockListener.testRunFailed("no reason"); in testPrintEvent_printToSocket() 118 mMockListener.invocationFailed((Throwable)EasyMock.anyObject()); in testPrintEvent_printToSocket() 119 EasyMock.replay(mMockListener); in testPrintEvent_printToSocket() 126 EasyMock.verify(mMockListener); in testPrintEvent_printToSocket() 136 ITestInvocationListener mMockListener = EasyMock.createMock(ITestInvocationListener.class); in testTestLog() local 138 new SubprocessTestResultsParser(mMockListener, true, new InvocationContext())) { in testTestLog() [all …]
|
D | LegacySubprocessResultsReporterTest.java | 64 ITestInvocationListener mMockListener = EasyMock.createMock(ITestInvocationListener.class); in testPrintEvent_printToSocket() local 66 new SubprocessTestResultsParser(mMockListener, true, new InvocationContext()); in testPrintEvent_printToSocket() 72 mMockListener.testIgnored(testDescrip); in testPrintEvent_printToSocket() 73 mMockListener.testAssumptionFailure(testDescrip, "fake trace"); in testPrintEvent_printToSocket() 74 mMockListener.testRunFailed("no reason"); in testPrintEvent_printToSocket() 75 mMockListener.invocationFailed((Throwable) EasyMock.anyObject()); in testPrintEvent_printToSocket() 76 EasyMock.replay(mMockListener); in testPrintEvent_printToSocket() 83 EasyMock.verify(mMockListener); in testPrintEvent_printToSocket()
|
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/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/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 | 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() 80 mMockListener.testLog( in testPullAndLog() 82 mMockListener.testEnded(EasyMock.eq(test), EasyMock.eq(50L), EasyMock.capture(capture)); in testPullAndLog() 84 EasyMock.replay(mMockDevice, mMockListener); in testPullAndLog() 87 EasyMock.verify(mMockDevice, mMockListener); in testPullAndLog() 104 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testSkipTestCollection() 111 mMockListener.testStarted(test, 0L); in testSkipTestCollection() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | ShardListenerTest.java | 43 private ITestInvocationListener mMockListener; field in ShardListenerTest 50 mMockListener = EasyMock.createMock(ITestInvocationListener.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/sandbox/ |
D | SandboxInvocationRunnerTest.java | 42 private ITestInvocationListener mMockListener; field in SandboxInvocationRunnerTest 49 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 56 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun() 59 EasyMock.expect(mMockSandbox.run(mConfig, mMockListener)).andReturn(res); in testPrepareAndRun() 61 EasyMock.replay(mMockSandbox, mMockListener); in testPrepareAndRun() 62 SandboxInvocationRunner.prepareAndRun(mConfig, mContext, mMockListener); in testPrepareAndRun() 63 EasyMock.verify(mMockSandbox, mMockListener); in testPrepareAndRun() 70 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun_prepFailure() 73 EasyMock.replay(mMockSandbox, mMockListener); in testPrepareAndRun_prepFailure() 75 SandboxInvocationRunner.prepareAndRun(mConfig, mContext, mMockListener); in testPrepareAndRun_prepFailure() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/python/ |
D | PythonBinaryHostTestTest.java | 46 private ITestInvocationListener mMockListener; field in PythonBinaryHostTestTest 52 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 81 mMockListener.testRunStarted(binary.getName(), 5); in testRun() 82 mMockListener.testLog( in testRun() 87 EasyMock.replay(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun() 88 mTest.run(mMockListener); in testRun() 89 EasyMock.verify(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun() 115 EasyMock.replay(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRunFail_exception() 117 mTest.run(mMockListener); in testRunFail_exception() 122 EasyMock.verify(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRunFail_exception() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | TestFailureListenerTest.java | 43 private ITestInvocationListener mMockListener; field in TestFailureListenerTest 49 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 56 mFailureListener.setLogger(mMockListener); in setUp() 71 mMockListener.testLog( in testTestFailed() 80 mMockListener.testLog( in testTestFailed() 88 EasyMock.replay(mMockListener, mMockDevice); in testTestFailed() 92 EasyMock.verify(mMockListener, mMockDevice); in testTestFailed() 109 mFailureListener.setLogger(mMockListener); in testTestFailed_notAvailable() 120 mMockListener.testLog( in testTestFailed_notAvailable() 129 EasyMock.replay(mMockListener, mMockDevice); in testTestFailed_notAvailable() [all …]
|
D | ModuleDefinitionTest.java | 84 private ITestInvocationListener mMockListener; field in ModuleDefinitionTest 154 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 184 EasyMock.replay(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in replayMocks() 199 EasyMock.verify(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in verifyMocks() 230 mMockListener.testRunStarted(MODULE_NAME, 0); in testRun() 231 mMockListener.testRunEnded( in testRun() 234 mModule.run(mMockListener); in testRun() 252 mMockListener.testRunStarted(MODULE_NAME, 0); in testRun_disabledPreparation() 253 mMockListener.testRunEnded( in testRun_disabledPreparation() 256 mModule.run(mMockListener); in testRun_disabledPreparation() [all …]
|
D | ITestSuiteMultiTest.java | 56 private ITestInvocationListener mMockListener; field in ITestSuiteMultiTest 114 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp() 147 mMockListener.testModuleStarted(EasyMock.anyObject()); in testMultiDeviceITestSuite() 148 mMockListener.testRunStarted("test1", 2); in testMultiDeviceITestSuite() 151 mMockListener.testStarted(test1, 0l); in testMultiDeviceITestSuite() 152 mMockListener.testEnded(test1, 5l, new HashMap<String, Metric>()); in testMultiDeviceITestSuite() 155 mMockListener.testStarted(test2, 0l); in testMultiDeviceITestSuite() 156 mMockListener.testEnded(test2, 5l, new HashMap<String, Metric>()); in testMultiDeviceITestSuite() 157 mMockListener.testRunEnded( in testMultiDeviceITestSuite() 159 mMockListener.testModuleEnded(); in testMultiDeviceITestSuite() [all …]
|