Creates a default Android JUnit launch configuration. Sets the instrumentation runner to the
first instrumentation found in the AndroidManifest.
ILaunchConfigurationWorkingCopy config = super.createLaunchConfiguration(element);
// just get first valid instrumentation runner
String instrumentation = new InstrumentationRunnerValidator(element.getJavaProject()).
getValidInstrumentationTestRunner();
if (instrumentation != null) {
config.setAttribute(AndroidJUnitLaunchConfigDelegate.ATTR_INSTR_NAME,
instrumentation);
}
// if a valid runner is not found, rely on launch delegate to log error.
// This method is called without explicit user action to launch Android JUnit, so avoid
// logging an error here.
AndroidJUnitLaunchConfigDelegate.setJUnitDefaults(config);
return config;