Fork me on GitHub

android:monkey

Full name:

com.simpligility.maven.plugins:android-maven-plugin:4.6.0:monkey

Description:

Can execute tests using UI/Application Exerciser Monkey.
Implements parsing parameters from pom or command line arguments and sets useful defaults as well. This goal will invoke Android Monkey exerciser. If the application crashes during the exercise, this goal can fail the build.
A typical usage of this goal can be found at Quality tools for Android project.

Attributes:

  • Requires a Maven project to be executed.

Optional Parameters

Name Type Since Description
aaptExtraArgs String[] - A list of extra arguments that must be passed to aapt.
User property is: android.aaptExtraArgs.
aaptVerbose boolean - Activate verbose output for the aapt execution in Maven debug mode. Defaults to "false"
User property is: android.aaptVerbose.
adbConnectionTimeout int - The timeout value for an adb connection in milliseconds.
Default value is: 5000.
User property is: android.adb.connectionTimeout.
androidManifestFile File - The AndroidManifest.xml file.
Default value is: ${project.basedir}/src/main/AndroidManifest.xml.
User property is: android.manifestFile.
assetsDirectory File - The android assets directory.
Default value is: ${project.basedir}/src/main/assets.
attachJar boolean -

Whether to attach the normal .jar file to the build, so it can be depended on by for example integration-tests which may then access R.java from this project.

Only disable it if you know you won't need it for any integration-tests. Otherwise, leave it enabled.


Default value is: true.
User property is: android.attachJar.
attachSources boolean -

Whether to attach sources to the build, which can be depended on by other apk projects, for including them in their builds.

Enabling this setting is only required if this project's source code and/or res(ources) will be included in other projects, using the Maven <dependency> tag.


Default value is: false.
User property is: android.attachSources.
configurations String - A selection of configurations to be included in the APK as a comma separated list. This will limit the configurations for a certain type. For example, specifying hdpi will exclude all resource folders with the mdpi or ldpi modifiers, but won't affect language or orientation modifiers. For more information about this option, look in the aapt command line help.
User property is: android.configurations.
customPackage String - Generates R.java into a different package.
User property is: android.customPackage.
destinationManifestFile File - Path to which to save the result of updating/merging/processing the source AndroidManifest.xml file (androidManifestFile).
Default value is: ${project.build.directory}/AndroidManifest.xml.
User property is: destination.manifestFile.
device String - Specifies which the serial number of the device to connect to. Using the special values "usb" or "emulator" is also valid. "usb" will connect to all actual devices connected (via usb). "emulator" will connect to all emulators connected. Multiple devices will be iterated over in terms of goals to run. All device interaction goals support this so you can e.. deploy the apk to all attached emulators and devices. Goals supporting this are devices, deploy, undeploy, redeploy, pull, push and instrument.
User property is: android.device.
deviceThreads int -

Specifies the number of threads to use for deploying and testing on attached devices.

This parameter can also be configured from command-line with parameter -Dandroid.deviceThreads=2.


User property is: android.deviceThreads.
devices String[] -

Specifies a list of serial numbers of each device you want to connect to. Using the special values "usb" or "emulator" is also valid. "usb" will connect to all actual devices connected (via usb). "emulator" will connect to all emulators connected. Multiple devices will be iterated over in terms of goals to run. All device interaction goals support this so you can e.. deploy the apk to all attached emulators and devices. Goals supporting this are devices, deploy, undeploy, redeploy, pull, push and instrument.

<devices>
    <device>usb</device>
    <device>emulator-5554</device>
</devices>

This parameter can also be configured from command-line with parameter -Dandroid.devices=usb,emulator.


User property is: android.devices.
disableConflictingDependenciesWarning File - Whether the plugin should show a warning if conflicting dependencies with the Android provided ones exist.
Default value is: false.
genDirectory File - Override default generated folder containing R.java
Default value is: ${project.build.directory}/generated-sources/r.
User property is: android.genDirectory.
generateApk boolean - Decides whether the Apk should be generated or not. If set to false, dx and apkBuilder will not run. This is probably most useful for a project used to generate apk sources to be inherited into another application project.
Default value is: true.
User property is: android.generateApk.
includeLibsJarsFromAar boolean -

Include jars stored in the libs folder of an aar as dependencies. Do not delete or change name as it is used in the LifeCycleParticipant.


Default value is: true.
includeLibsJarsFromApklib boolean -

Include jars stored in the libs folder of an apklib as dependencies. Do not delete or change name as it is used in the LifeCycleParticipant.


Default value is: false.
ips String[] -

External IP addresses. The connect goal of the android maven plugin will execute an adb connect on each IP address. If you have external dervice, you should call this connect goal before any other goal : mvn clean android:connect install.

The Maven plugin will automatically add all these IP addresses into the the devices parameter. If you want to disconnect the IP addresses after the build, you can call the disconnect goal : mvn clean android:connect install android:disconnect

<ips>
    <ip>127.0.0.1:5556</ip>
</ips>

User property is: android.ips.
jack Jack - configure the Jack compiler
monkey Monkey - The configuration for the ui automator goal. As soon as a lint goal is invoked the command will be executed unless the skip parameter is set. A minimal configuration that will run lint and produce a XML report in ${project.build.directory}/lint/lint-results.xml is
<monkey>
  <skip>false</skip>
</monkey>
Full configuration can use these parameters.
 <monkey>
   <skip>false</skip>
   <eventCount>5000</eventCount>
   <seed>123456</seed>
   <throttle>10</throttle>
   <percentTouch>10</percentTouch>
   <percentMotion>10</percentMotion>
   <percentTrackball>10</percentTrackball>
   <percentNav>10</percentNav>
   <percentMajorNav>10</percentMajorNav>
   <percentSyskeys>10</percentSyskeys>
   <percentAppswitch>10</percentAppswitch>
   <percentAnyevent>10</percentAnyevent>
   <packages>
       <package>com.foo</package>
       <package>com.bar</package>
   </packages>
   <categories>
       <category>foo</category>
       <category>bar</category>
   </categories>
   <debugNoEvents>true</debugNoEvents>
   <hprof>true</hprof>
   <ignoreCrashes>true</ignoreCrashes>
   <ignoreTimeouts>true</ignoreTimeouts>
   <ignoreSecurityExceptions>true</ignoreSecurityExceptions>
   <killProcessAfterError>true</killProcessAfterError>
   <monitorNativeCrashes>true</monitorNativeCrashes>
   <createReport>true</createReport>
 </monkey>
Alternatively to the plugin configuration values can also be configured as properties on the command line as android.lint.* or in pom or settings file as properties like lint*.
monkeyCategories String[] - If you specify one or more categories this way, the Monkey will only allow the system to visit activities that are listed with one of the specified categories. If you don't specify any categories, the Monkey will select activities listed with the category Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY.
User property is: android.monkey.categories.
monkeyCreateReport Boolean - Create a junit xml format compatible output file containing the test results for each device the instrumentation tests run on.

The files are stored in target/surefire-reports and named TEST-deviceid.xml. The deviceid for an emulator is deviceSerialNumber_avdName_manufacturer_model. The serial number is commonly emulator-5554 for the first emulator started with numbers increasing. avdName is as defined in the SDK tool. The manufacturer is typically "unknown" and the model is typically "sdk".
The deviceid for an actual devices is deviceSerialNumber_manufacturer_model.

The file contains system properties from the system running the Android Maven Plugin (JVM) and device properties from the device/emulator the tests are running on.

The file contains a single TestSuite for all tests and a TestCase for each test method. Errors and failures are logged in the file and the system log with full stack traces and other details available. Defaults to false.
User property is: android.monkey.createReport.
monkeyDebugNoEvents Boolean - When specified, the Monkey will perform the initial launch into a test activity, but will not generate any further events. For best results, combine with -v, one or more package constraints, and a non-zero throttle to keep the Monkey running for 30 seconds or more. This provides an environment in which you can monitor package transitions invoked by your application.
User property is: android.monkey.debugNoEvents.
monkeyEventCount Integer - Number of generated events. Defaults to 1000.
User property is: android.monkey.eventCount.
monkeyHprof Boolean - If set, this option will generate profiling reports immediately before and after the Monkey event sequence. This will generate large (~5Mb) files in data/misc, so use with care. See Traceview for more information on trace files.
User property is: android.monkey.Hprof.
monkeyIgnoreCrashes Boolean - Normally, the Monkey will stop when the application crashes or experiences any type of unhandled exception. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. Settings this option is different to setting testFailureIgnore or maven.test.failure.ignore to true, it will impact monkey run but not the result of the maven build.
User property is: android.monkey.ignoreCrashes.
monkeyIgnoreSecurityExceptions Boolean - Normally, the Monkey will stop when the application experiences any type of permissions error, for example if it attempts to launch an activity that requires certain permissions. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. * Defaults to false.
User property is: android.monkey.IgnoreSecurityExceptions.
monkeyIgnoreTimeouts Boolean - Normally, the Monkey will stop when the application experiences any type of timeout error such as a "Application Not Responding" dialog. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. Defaults to false.
User property is: android.monkey.IgnoreTimeouts.
monkeyKillProcessAfterError Boolean - Normally, when the Monkey stops due to an error, the application that failed will be left running. When this option is set, it will signal the system to stop the process in which the error occurred. Note, under a normal (successful) completion, the launched process(es) are not stopped, and the device is simply left in the last state after the final event. Defaults to false.
User property is: android.monkey.KillProcessAfterError.
monkeyMonitorNativeCrashes Boolean - Watches for and reports crashes occurring in the Android system native code. If --kill-process-after-error is set, the system will stop. Defaults to false.
User property is: android.monkey.MonitorNativeCrashes.
monkeyPackages String[] - If you specify one or more packages this way, the Monkey will only allow the system to visit activities within those packages. If your application requires access to activities in other packages (e.g. to select a contact) you'll need to specify those packages as well. If you don't specify any packages, the Monkey will allow the system to launch activities in all packages.
User property is: android.monkey.packages.
monkeyPercentAnyEvent Integer - Adjust percentage of other types of events. This is a catch-all for all other types of events such as keypresses, other less-used buttons on the device, and so forth.
User property is: android.monkey.percentAnyevent.
monkeyPercentAppswitch Integer - Adjust percentage of activity launches. At random intervals, the Monkey will issue a startActivity() call, as a way of maximizing coverage of all activities within your package.
User property is: android.monkey.percentAppswitch.
monkeyPercentMajorNav Integer - Adjust percentage of "major" navigation events. (These are navigation events that will typically cause actions within your UI, such as the center button in a 5-way pad, the back key, or the menu key.)
User property is: android.monkey.percentMajorNav.
monkeyPercentMotion Integer - Adjust percentage of motion events. (Motion events consist of a down event somewhere on the screen, a series of pseudo-random movements, and an up event.)
User property is: android.monkey.percentMotion.
monkeyPercentNav Integer - Adjust percentage of "basic" navigation events. (Navigation events consist of up/down/left/right, as input from a directional input device.)
User property is: android.monkey.percentNav.
monkeyPercentSyskeys Integer - Adjust percentage of "system" key events. (These are keys that are generally reserved for use by the system, such as Home, Back, Start Call, End Call, or Volume controls.) Defaults to null.
User property is: android.monkey.percentSyskeys.
monkeyPercentTouch Integer - Adjust percentage of touch events. (Touch events are a down-up event in a single place on the screen.)
User property is: android.monkey.percentTouch.
monkeyPercentTrackball Integer - Adjust percentage of trackball events. (Trackball events consist of one or more random movements, sometimes followed by a click.)
User property is: android.monkey.percentTrackball.
monkeySeed Long - Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed value, it will generate the same sequence of events.
User property is: android.monkey.seed.
monkeySkip Boolean - Enables or disables monkey test goal. If true it will be skipped; if false, it will be run. Defaults to true.
User property is: android.monkey.skip.
monkeyThrottle Long - Inserts a fixed delay between events. You can use this option to slow down the Monkey. If not specified, there is no delay and the events are generated as rapidly as possible.
User property is: android.monkey.throttle.
nativeLibrariesDirectory File -

Root folder containing native libraries to include in the application package.


Default value is: ${project.basedir}/src/main/libs.
User property is: android.nativeLibrariesDirectory.
ndk Ndk -

The Android NDK to use.

Looks like this:

<ndk>
    <path>/opt/android-ndk-r4</path>
</ndk>

The <path> parameter is optional. The default is the setting of the ANDROID_NDK_HOME environment variable. The parameter can be used to override this setting with a different environment variable like this:

<ndk>
    <path>${env.ANDROID_NDK_HOME}</path>
</ndk>

or just with a hardcoded absolute path. The parameters can also be configured from command-line with parameter -Dandroid.ndk.path.


proguardFile File - Automatically create a ProGuard configuration file that will guard Activity classes and the like that are defined in the AndroidManifest.xml. This files is then automatically used in the proguard mojo execution, if enabled.
User property is: android.proguardFile.
release boolean - Whether to create a release build (default is false / debug build). This affect BuildConfig generation and apk generation at this stage, but should probably affect other aspects of the build.
Default value is: false.
User property is: android.release.
renameManifestPackage String -

A possibly new package name for the application. This value will be passed on to the aapt parameter --rename-manifest-package. Look to aapt for more help on this.


User property is: android.renameManifestPackage.
resourceDirectory File - The Android resources (src/main/res) directory. Note that this is different from the Maven/Java resources directory (src/main/resources) and should not be set to be the same since different processing is carried out on these folder by different plugins and tools.
Default value is: ${project.basedir}/src/main/res.
resourceOverlayDirectories File[] - The android resources overlay directories. If this is specified, the resourceOverlayDirectory parameter will be ignored.
resourceOverlayDirectory File - The android resources overlay directory. This will be overridden by resourceOverlayDirectories if present.
Default value is: ${project.basedir}/res-overlay.
sdk Sdk -

The Android SDK to use.

Looks like this:

<sdk>
    <path>/opt/android-sdk-linux</path>
    <platform>2.1</platform>
</sdk>

The <platform> parameter is optional, and corresponds to the platforms/android-* directories in the Android SDK directory. Default is the latest available version, so you only need to set it if you for example want to use platform 1.5 but also have e.g. 2.2 installed. Has no effect when used on an Android SDK 1.1. The parameter can also be coded as the API level. Therefore valid values are 1.1, 1.5, 1.6, 2.0, 2.01, 2.1, 2.2 and so as well as 3, 4, 5, 6, 7, 8... 19. If a platform/api level is not installed on the machine an error message will be produced.

The <path> parameter is optional. The default is the setting of the ANDROID_HOME environment variable. The parameter can be used to override this setting with a different environment variable like this:

<sdk>
    <path>${env.ANDROID_SDK}</path>
</sdk>

or just with a hard-coded absolute path. The parameters can also be configured from command-line with parameters -Dandroid.sdk.path and -Dandroid.sdk.platform.


undeployBeforeDeploy boolean -

Whether to undeploy an apk from the device before deploying it.

Only has effect when running mvn android:deploy in an Android application project manually, or when running mvn integration-test (or mvn install) in a project with instrumentation tests.

It is useful to keep this set to true at all times, because if an apk with the same package was previously signed with a different keystore, and deployed to the device, deployment will fail because your keystore is different.


Default value is: false.
User property is: android.undeployBeforeDeploy.
unpackedLibsFolder File - Folder in which AAR library dependencies will be unpacked.
Default value is: ${project.build.directory}/unpacked-libs.
User property is: unpackedLibsFolder.

Parameter Details

aaptExtraArgs:

A list of extra arguments that must be passed to aapt.
  • Type: java.lang.String[]
  • Required: No
  • User Property: android.aaptExtraArgs

aaptVerbose:

Activate verbose output for the aapt execution in Maven debug mode. Defaults to "false"
  • Type: boolean
  • Required: No
  • User Property: android.aaptVerbose

adbConnectionTimeout:

The timeout value for an adb connection in milliseconds.
  • Type: int
  • Required: No
  • User Property: android.adb.connectionTimeout
  • Default: 5000

androidManifestFile:

The AndroidManifest.xml file.
  • Type: java.io.File
  • Required: No
  • User Property: android.manifestFile
  • Default: ${project.basedir}/src/main/AndroidManifest.xml

assetsDirectory:

The android assets directory.
  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}/src/main/assets

attachJar:

Whether to attach the normal .jar file to the build, so it can be depended on by for example integration-tests which may then access R.java from this project.

Only disable it if you know you won't need it for any integration-tests. Otherwise, leave it enabled.

  • Type: boolean
  • Required: No
  • User Property: android.attachJar
  • Default: true

attachSources:

Whether to attach sources to the build, which can be depended on by other apk projects, for including them in their builds.

Enabling this setting is only required if this project's source code and/or res(ources) will be included in other projects, using the Maven <dependency> tag.

  • Type: boolean
  • Required: No
  • User Property: android.attachSources
  • Default: false

configurations:

A selection of configurations to be included in the APK as a comma separated list. This will limit the configurations for a certain type. For example, specifying hdpi will exclude all resource folders with the mdpi or ldpi modifiers, but won't affect language or orientation modifiers. For more information about this option, look in the aapt command line help.
  • Type: java.lang.String
  • Required: No
  • User Property: android.configurations

customPackage:

Generates R.java into a different package.
  • Type: java.lang.String
  • Required: No
  • User Property: android.customPackage

destinationManifestFile:

Path to which to save the result of updating/merging/processing the source AndroidManifest.xml file (androidManifestFile).
  • Type: java.io.File
  • Required: No
  • User Property: destination.manifestFile
  • Default: ${project.build.directory}/AndroidManifest.xml

device:

Specifies which the serial number of the device to connect to. Using the special values "usb" or "emulator" is also valid. "usb" will connect to all actual devices connected (via usb). "emulator" will connect to all emulators connected. Multiple devices will be iterated over in terms of goals to run. All device interaction goals support this so you can e.. deploy the apk to all attached emulators and devices. Goals supporting this are devices, deploy, undeploy, redeploy, pull, push and instrument.
  • Type: java.lang.String
  • Required: No
  • User Property: android.device

deviceThreads:

Specifies the number of threads to use for deploying and testing on attached devices.

This parameter can also be configured from command-line with parameter -Dandroid.deviceThreads=2.

  • Type: int
  • Required: No
  • User Property: android.deviceThreads

devices:

Specifies a list of serial numbers of each device you want to connect to. Using the special values "usb" or "emulator" is also valid. "usb" will connect to all actual devices connected (via usb). "emulator" will connect to all emulators connected. Multiple devices will be iterated over in terms of goals to run. All device interaction goals support this so you can e.. deploy the apk to all attached emulators and devices. Goals supporting this are devices, deploy, undeploy, redeploy, pull, push and instrument.

<devices>
    <device>usb</device>
    <device>emulator-5554</device>
</devices>

This parameter can also be configured from command-line with parameter -Dandroid.devices=usb,emulator.

  • Type: java.lang.String[]
  • Required: No
  • User Property: android.devices

disableConflictingDependenciesWarning:

Whether the plugin should show a warning if conflicting dependencies with the Android provided ones exist.
  • Type: java.io.File
  • Required: No
  • Default: false

genDirectory:

Override default generated folder containing R.java
  • Type: java.io.File
  • Required: No
  • User Property: android.genDirectory
  • Default: ${project.build.directory}/generated-sources/r

generateApk:

Decides whether the Apk should be generated or not. If set to false, dx and apkBuilder will not run. This is probably most useful for a project used to generate apk sources to be inherited into another application project.
  • Type: boolean
  • Required: No
  • User Property: android.generateApk
  • Default: true

includeLibsJarsFromAar:

Include jars stored in the libs folder of an aar as dependencies. Do not delete or change name as it is used in the LifeCycleParticipant.

  • Type: boolean
  • Required: No
  • Default: true

includeLibsJarsFromApklib:

Include jars stored in the libs folder of an apklib as dependencies. Do not delete or change name as it is used in the LifeCycleParticipant.

  • Type: boolean
  • Required: No
  • Default: false

ips:

External IP addresses. The connect goal of the android maven plugin will execute an adb connect on each IP address. If you have external dervice, you should call this connect goal before any other goal : mvn clean android:connect install.

The Maven plugin will automatically add all these IP addresses into the the devices parameter. If you want to disconnect the IP addresses after the build, you can call the disconnect goal : mvn clean android:connect install android:disconnect

<ips>
    <ip>127.0.0.1:5556</ip>
</ips>
  • Type: java.lang.String[]
  • Required: No
  • User Property: android.ips

jack:

configure the Jack compiler
  • Type: com.simpligility.maven.plugins.android.configuration.Jack
  • Required: No

monkey:

The configuration for the ui automator goal. As soon as a lint goal is invoked the command will be executed unless the skip parameter is set. A minimal configuration that will run lint and produce a XML report in ${project.build.directory}/lint/lint-results.xml is
<monkey>
  <skip>false</skip>
</monkey>
Full configuration can use these parameters.
 <monkey>
   <skip>false</skip>
   <eventCount>5000</eventCount>
   <seed>123456</seed>
   <throttle>10</throttle>
   <percentTouch>10</percentTouch>
   <percentMotion>10</percentMotion>
   <percentTrackball>10</percentTrackball>
   <percentNav>10</percentNav>
   <percentMajorNav>10</percentMajorNav>
   <percentSyskeys>10</percentSyskeys>
   <percentAppswitch>10</percentAppswitch>
   <percentAnyevent>10</percentAnyevent>
   <packages>
       <package>com.foo</package>
       <package>com.bar</package>
   </packages>
   <categories>
       <category>foo</category>
       <category>bar</category>
   </categories>
   <debugNoEvents>true</debugNoEvents>
   <hprof>true</hprof>
   <ignoreCrashes>true</ignoreCrashes>
   <ignoreTimeouts>true</ignoreTimeouts>
   <ignoreSecurityExceptions>true</ignoreSecurityExceptions>
   <killProcessAfterError>true</killProcessAfterError>
   <monitorNativeCrashes>true</monitorNativeCrashes>
   <createReport>true</createReport>
 </monkey>
Alternatively to the plugin configuration values can also be configured as properties on the command line as android.lint.* or in pom or settings file as properties like lint*.
  • Type: com.simpligility.maven.plugins.android.configuration.Monkey
  • Required: No

monkeyCategories:

If you specify one or more categories this way, the Monkey will only allow the system to visit activities that are listed with one of the specified categories. If you don't specify any categories, the Monkey will select activities listed with the category Intent.CATEGORY_LAUNCHER or Intent.CATEGORY_MONKEY.
  • Type: java.lang.String[]
  • Required: No
  • User Property: android.monkey.categories

monkeyCreateReport:

Create a junit xml format compatible output file containing the test results for each device the instrumentation tests run on.

The files are stored in target/surefire-reports and named TEST-deviceid.xml. The deviceid for an emulator is deviceSerialNumber_avdName_manufacturer_model. The serial number is commonly emulator-5554 for the first emulator started with numbers increasing. avdName is as defined in the SDK tool. The manufacturer is typically "unknown" and the model is typically "sdk".
The deviceid for an actual devices is deviceSerialNumber_manufacturer_model.

The file contains system properties from the system running the Android Maven Plugin (JVM) and device properties from the device/emulator the tests are running on.

The file contains a single TestSuite for all tests and a TestCase for each test method. Errors and failures are logged in the file and the system log with full stack traces and other details available. Defaults to false.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.createReport

monkeyDebugNoEvents:

When specified, the Monkey will perform the initial launch into a test activity, but will not generate any further events. For best results, combine with -v, one or more package constraints, and a non-zero throttle to keep the Monkey running for 30 seconds or more. This provides an environment in which you can monitor package transitions invoked by your application.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.debugNoEvents

monkeyEventCount:

Number of generated events. Defaults to 1000.
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.eventCount

monkeyHprof:

If set, this option will generate profiling reports immediately before and after the Monkey event sequence. This will generate large (~5Mb) files in data/misc, so use with care. See Traceview for more information on trace files.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.Hprof

monkeyIgnoreCrashes:

Normally, the Monkey will stop when the application crashes or experiences any type of unhandled exception. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. Settings this option is different to setting testFailureIgnore or maven.test.failure.ignore to true, it will impact monkey run but not the result of the maven build.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.ignoreCrashes

monkeyIgnoreSecurityExceptions:

Normally, the Monkey will stop when the application experiences any type of permissions error, for example if it attempts to launch an activity that requires certain permissions. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. * Defaults to false.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.IgnoreSecurityExceptions

monkeyIgnoreTimeouts:

Normally, the Monkey will stop when the application experiences any type of timeout error such as a "Application Not Responding" dialog. If you specify this option, the Monkey will continue to send events to the system, until the count is completed. Defaults to false.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.IgnoreTimeouts

monkeyKillProcessAfterError:

Normally, when the Monkey stops due to an error, the application that failed will be left running. When this option is set, it will signal the system to stop the process in which the error occurred. Note, under a normal (successful) completion, the launched process(es) are not stopped, and the device is simply left in the last state after the final event. Defaults to false.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.KillProcessAfterError

monkeyMonitorNativeCrashes:

Watches for and reports crashes occurring in the Android system native code. If --kill-process-after-error is set, the system will stop. Defaults to false.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.MonitorNativeCrashes

monkeyPackages:

If you specify one or more packages this way, the Monkey will only allow the system to visit activities within those packages. If your application requires access to activities in other packages (e.g. to select a contact) you'll need to specify those packages as well. If you don't specify any packages, the Monkey will allow the system to launch activities in all packages.
  • Type: java.lang.String[]
  • Required: No
  • User Property: android.monkey.packages

monkeyPercentAnyEvent:

Adjust percentage of other types of events. This is a catch-all for all other types of events such as keypresses, other less-used buttons on the device, and so forth.
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentAnyevent

monkeyPercentAppswitch:

Adjust percentage of activity launches. At random intervals, the Monkey will issue a startActivity() call, as a way of maximizing coverage of all activities within your package.
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentAppswitch

monkeyPercentMajorNav:

Adjust percentage of "major" navigation events. (These are navigation events that will typically cause actions within your UI, such as the center button in a 5-way pad, the back key, or the menu key.)
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentMajorNav

monkeyPercentMotion:

Adjust percentage of motion events. (Motion events consist of a down event somewhere on the screen, a series of pseudo-random movements, and an up event.)
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentMotion

monkeyPercentNav:

Adjust percentage of "basic" navigation events. (Navigation events consist of up/down/left/right, as input from a directional input device.)
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentNav

monkeyPercentSyskeys:

Adjust percentage of "system" key events. (These are keys that are generally reserved for use by the system, such as Home, Back, Start Call, End Call, or Volume controls.) Defaults to null.
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentSyskeys

monkeyPercentTouch:

Adjust percentage of touch events. (Touch events are a down-up event in a single place on the screen.)
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentTouch

monkeyPercentTrackball:

Adjust percentage of trackball events. (Trackball events consist of one or more random movements, sometimes followed by a click.)
  • Type: java.lang.Integer
  • Required: No
  • User Property: android.monkey.percentTrackball

monkeySeed:

Seed value for pseudo-random number generator. If you re-run the Monkey with the same seed value, it will generate the same sequence of events.
  • Type: java.lang.Long
  • Required: No
  • User Property: android.monkey.seed

monkeySkip:

Enables or disables monkey test goal. If true it will be skipped; if false, it will be run. Defaults to true.
  • Type: java.lang.Boolean
  • Required: No
  • User Property: android.monkey.skip

monkeyThrottle:

Inserts a fixed delay between events. You can use this option to slow down the Monkey. If not specified, there is no delay and the events are generated as rapidly as possible.
  • Type: java.lang.Long
  • Required: No
  • User Property: android.monkey.throttle

nativeLibrariesDirectory:

Root folder containing native libraries to include in the application package.

  • Type: java.io.File
  • Required: No
  • User Property: android.nativeLibrariesDirectory
  • Default: ${project.basedir}/src/main/libs

ndk:

The Android NDK to use.

Looks like this:

<ndk>
    <path>/opt/android-ndk-r4</path>
</ndk>

The <path> parameter is optional. The default is the setting of the ANDROID_NDK_HOME environment variable. The parameter can be used to override this setting with a different environment variable like this:

<ndk>
    <path>${env.ANDROID_NDK_HOME}</path>
</ndk>

or just with a hardcoded absolute path. The parameters can also be configured from command-line with parameter -Dandroid.ndk.path.

  • Type: com.simpligility.maven.plugins.android.configuration.Ndk
  • Required: No

proguardFile:

Automatically create a ProGuard configuration file that will guard Activity classes and the like that are defined in the AndroidManifest.xml. This files is then automatically used in the proguard mojo execution, if enabled.
  • Type: java.io.File
  • Required: No
  • User Property: android.proguardFile

release:

Whether to create a release build (default is false / debug build). This affect BuildConfig generation and apk generation at this stage, but should probably affect other aspects of the build.
  • Type: boolean
  • Required: No
  • User Property: android.release
  • Default: false

renameManifestPackage:

A possibly new package name for the application. This value will be passed on to the aapt parameter --rename-manifest-package. Look to aapt for more help on this.

  • Type: java.lang.String
  • Required: No
  • User Property: android.renameManifestPackage

resourceDirectory:

The Android resources (src/main/res) directory. Note that this is different from the Maven/Java resources directory (src/main/resources) and should not be set to be the same since different processing is carried out on these folder by different plugins and tools.
  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}/src/main/res

resourceOverlayDirectories:

The android resources overlay directories. If this is specified, the resourceOverlayDirectory parameter will be ignored.
  • Type: java.io.File[]
  • Required: No

resourceOverlayDirectory:

The android resources overlay directory. This will be overridden by resourceOverlayDirectories if present.
  • Type: java.io.File
  • Required: No
  • Default: ${project.basedir}/res-overlay

sdk:

The Android SDK to use.

Looks like this:

<sdk>
    <path>/opt/android-sdk-linux</path>
    <platform>2.1</platform>
</sdk>

The <platform> parameter is optional, and corresponds to the platforms/android-* directories in the Android SDK directory. Default is the latest available version, so you only need to set it if you for example want to use platform 1.5 but also have e.g. 2.2 installed. Has no effect when used on an Android SDK 1.1. The parameter can also be coded as the API level. Therefore valid values are 1.1, 1.5, 1.6, 2.0, 2.01, 2.1, 2.2 and so as well as 3, 4, 5, 6, 7, 8... 19. If a platform/api level is not installed on the machine an error message will be produced.

The <path> parameter is optional. The default is the setting of the ANDROID_HOME environment variable. The parameter can be used to override this setting with a different environment variable like this:

<sdk>
    <path>${env.ANDROID_SDK}</path>
</sdk>

or just with a hard-coded absolute path. The parameters can also be configured from command-line with parameters -Dandroid.sdk.path and -Dandroid.sdk.platform.

  • Type: com.simpligility.maven.plugins.android.configuration.Sdk
  • Required: No

undeployBeforeDeploy:

Whether to undeploy an apk from the device before deploying it.

Only has effect when running mvn android:deploy in an Android application project manually, or when running mvn integration-test (or mvn install) in a project with instrumentation tests.

It is useful to keep this set to true at all times, because if an apk with the same package was previously signed with a different keystore, and deployed to the device, deployment will fail because your keystore is different.

  • Type: boolean
  • Required: No
  • User Property: android.undeployBeforeDeploy
  • Default: false

unpackedLibsFolder:

Folder in which AAR library dependencies will be unpacked.
  • Type: java.io.File
  • Required: No
  • User Property: unpackedLibsFolder
  • Default: ${project.build.directory}/unpacked-libs