com.googlecode.autoandroid.positron
Class Start
java.lang.Object
com.googlecode.autoandroid.positron.Start
public class Start
- extends Object
Start the positron runner on the device.
This replaces the depreciated RunTests class. It will call 'adb install -r'
to reinstall the given apk, and then fire up the positron instrumentation.
See run() for arguments and details.
- Author:
- philhsmith
Constructor Summary |
Start()
|
Method Summary |
static void |
main(String[] args)
|
void |
run()
|
void |
run(String instrumentedPkg)
|
void |
run(String instrumentedPkg,
String apk)
(Re)install the given apk, set up the needed port forwarding and start the positron instrumentation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Start
public Start()
main
public static final void main(String[] args)
throws Exception
- Throws:
Exception
run
public void run()
run
public void run(String instrumentedPkg)
run
public void run(String instrumentedPkg,
String apk)
- (Re)install the given apk, set up the needed port forwarding and start the positron instrumentation.
If instrumentedPkg is null, the property positron.instrumentedPkg is checked. If that
is also null, look for ./AndroidManifest.xml, and parse it to find the instrumented context.
It looks for the targetContext attribute of an instrumentation tag that has the Positron class
as it's instrumentationName. If it fails to find that, it errors out.
If the apk is null, the property positron.apk is checked. If that is null, it looks
for files matching ./bin/*apk and takes the first. If none are found, it errors out.
- Parameters:
instrumentedPkg
- The android application package to instrument.apk
- The android application archive to (re)install to the device.