use of junit.framework.TestSuite in project android_frameworks_base by ParanoidAndroid.
the class UnitTestSuiteBuilderTest method testShouldExcludeIntrumentationTests.
public void testShouldExcludeIntrumentationTests() throws Exception {
unitTestSuiteBuilder.includePackages(packageFor(InstrumentationTest.class));
TestSuite testSuite = unitTestSuiteBuilder.build();
Assert.assertEquals(0, ListTestCaseNames.getTestCaseNames(testSuite).size());
SuiteExecutionRecorder recorder = runSuite(unitTestSuiteBuilder);
assertFalse(recorder.saw("InstrumentationTest.testInstrumentation"));
assertTrue(recorder.testsSeen.isEmpty());
}
use of junit.framework.TestSuite in project android_frameworks_base by ParanoidAndroid.
the class LayoutTestsAutoRunner method getAllTests.
@Override
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(LayoutTestsAutoTest.class);
suite.addTestSuite(LoadTestsAutoTest.class);
return suite;
}
use of junit.framework.TestSuite in project android_frameworks_base by ParanoidAndroid.
the class RsPerfTestRunner method getAllTests.
@Override
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(RsBenchTest.class);
return suite;
}
use of junit.framework.TestSuite in project android_frameworks_base by ParanoidAndroid.
the class SmokeTestRunner method getAllTests.
/**
* Returns a single testcase for each app to launch
*/
@Override
public TestSuite getAllTests() {
final TestSuite suite = new TestSuite(SUITE_NAME);
final PackageManager pm = getTargetContext().getPackageManager();
final List<ResolveInfo> apps = ProcessErrorsTest.getLauncherActivities(pm);
final TestCase setupTest = new ProcessErrorsTest() {
@Override
public void runTest() throws Exception {
testSetUpConditions();
}
};
setupTest.setName("testSetUpConditions");
suite.addTest(setupTest);
final TestCase postBootTest = new ProcessErrorsTest() {
@Override
public void runTest() throws Exception {
testNoProcessErrorsAfterBoot();
}
};
postBootTest.setName("testNoProcessErrorsAfterBoot");
suite.addTest(postBootTest);
for (final ResolveInfo app : apps) {
final TestCase appTest = new ProcessErrorsTest() {
@Override
public void runTest() throws Exception {
final Set<ProcessError> errSet = new HashSet<ProcessError>();
final Collection<ProcessError> errProcs = runOneActivity(app);
if (errProcs != null) {
errSet.addAll(errProcs);
}
if (!errSet.isEmpty()) {
fail(String.format("Got %d errors:\n%s", errSet.size(), reportWrappedListContents(errSet)));
}
}
};
appTest.setName(app.activityInfo.name);
suite.addTest(appTest);
}
final TestCase asyncErrorTest = new ProcessErrorsTest() {
@Override
public void runTest() throws Exception {
testZZReportAsyncErrors();
}
};
asyncErrorTest.setName("testAsynchronousErrors");
suite.addTest(asyncErrorTest);
return suite;
}
use of junit.framework.TestSuite in project android_frameworks_base by ParanoidAndroid.
the class BluetoothTestRunner method getAllTests.
@Override
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(BluetoothStressTest.class);
return suite;
}
Aggregations