/** * {@inheritDoc} */ public void setDebug( boolean debug ) { addBooleanArg( DEBUG_ARG_NAME, debug ); }
/** * {@inheritDoc} */ public void setTestClassOrMethods( String[] testClassOrMethods ) { for ( String testClassOrMethod : testClassOrMethods ) { addInstrumentationArg( CLASS_ARG_NAME, testClassOrMethod ); } }
/** * {@inheritDoc} */ public void run( ITestRunListener... listeners ) throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException { run( Arrays.asList( listeners ) ); }
= new UIAutomatorRemoteAndroidTestRunner( parsedJarFile, device ); automatorRemoteAndroidTestRunner.setRunName( "ui uiautomator tests" ); automatorRemoteAndroidTestRunner.setDebug( uiautomatorDebug ); automatorRemoteAndroidTestRunner.setTestClassOrMethods( parsedTestClassOrMethods ); automatorRemoteAndroidTestRunner.setNoHup( parsedNoHup ); automatorRemoteAndroidTestRunner.setUserProperties( session.getUserProperties(), parsedPropertiesKeyPrefix ); automatorRemoteAndroidTestRunner.setDumpFilePath( parsedDumpFilePath ); parsedCreateReport, parsedTakeScreenshotOnFailure, parsedScreenshotsPathOnDevice, parsedReportSuffix, targetDirectory ); automatorRemoteAndroidTestRunner.run( testRunListener ); if ( testRunListener.hasFailuresOrErrors() && !isIgnoreTestFailures() )
ShellCommandUnresponsiveException, IOException final String runCaseCommandStr = String.format( "uiautomator runtest %1$s %2$s", jarFile, buildArgsCommand() ); Log.i( LOG_TAG, String.format( "Running %1$s on %2$s", runCaseCommandStr, mRemoteDevice.getSerialNumber() ) ); mParser = new InstrumentationResultParser( mRunName, listeners );
/** * {@inheritDoc} */ public void addBooleanArg( String name, boolean value ) { addInstrumentationArg( name, Boolean.toString( value ) ); }
addInstrumentationArg( name, value );