use of android.test.AndroidTestRunner in project android_frameworks_base by ParanoidAndroid.
the class TestSuiteBuilder method addTestClassByName.
/** @hide pending API Council approval */
public TestSuiteBuilder addTestClassByName(String testClassName, String testMethodName, Context context) {
AndroidTestRunner atr = new AndroidTestRunner();
atr.setContext(context);
atr.setTestClassName(testClassName, testMethodName);
this.testCases.addAll(atr.getTestCases());
return this;
}
use of android.test.AndroidTestRunner in project platform_frameworks_base by android.
the class UiAutomatorInstrumentationTestRunner method getAndroidTestRunner.
@Override
protected AndroidTestRunner getAndroidTestRunner() {
AndroidTestRunner testRunner = super.getAndroidTestRunner();
testRunner.addTestListener(new TestListener() {
@Override
public void startTest(Test test) {
if (test instanceof UiAutomatorTestCase) {
((UiAutomatorTestCase) test).initialize(getArguments());
}
}
@Override
public void endTest(Test test) {
}
@Override
public void addFailure(Test test, AssertionFailedError e) {
}
@Override
public void addError(Test test, Throwable t) {
}
});
return testRunner;
}
use of android.test.AndroidTestRunner in project platform_frameworks_base by android.
the class TestSuiteBuilder method addTestClassByName.
/** @hide pending API Council approval */
public TestSuiteBuilder addTestClassByName(String testClassName, String testMethodName, Context context) {
AndroidTestRunner atr = new AndroidTestRunner();
atr.setContext(context);
atr.setTestClassName(testClassName, testMethodName);
this.testCases.addAll(atr.getTestCases());
return this;
}
use of android.test.AndroidTestRunner in project android_frameworks_base by DirtyUnicorns.
the class TestSuiteBuilder method addTestClassByName.
/** @hide pending API Council approval */
public TestSuiteBuilder addTestClassByName(String testClassName, String testMethodName, Context context) {
AndroidTestRunner atr = new AndroidTestRunner();
atr.setContext(context);
atr.setTestClassName(testClassName, testMethodName);
this.testCases.addAll(atr.getTestCases());
return this;
}
use of android.test.AndroidTestRunner in project android_frameworks_base by crdroidandroid.
the class UiAutomatorInstrumentationTestRunner method getAndroidTestRunner.
@Override
protected AndroidTestRunner getAndroidTestRunner() {
AndroidTestRunner testRunner = super.getAndroidTestRunner();
testRunner.addTestListener(new TestListener() {
@Override
public void startTest(Test test) {
if (test instanceof UiAutomatorTestCase) {
((UiAutomatorTestCase) test).initialize(getArguments());
}
}
@Override
public void endTest(Test test) {
}
@Override
public void addFailure(Test test, AssertionFailedError e) {
}
@Override
public void addError(Test test, Throwable t) {
}
});
return testRunner;
}
Aggregations