Plugin to integrate AppThwack with Gradle and Android Studio.
Initial 1.3 release.
A typical build.gradle file for Android Studio will look like this:
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.4'
//Jersey explicit requirement due to Groovy compiler + Java refection issues.
classpath 'com.sun.jersey:jersey-core:1.8'
classpath 'com.appthwack:gradle:1.3'
}
}
apply plugin: 'android'
apply plugin: 'appthwack'
dependencies {
//...
}
android {
//...
}
appthwack {
//See 'Configuration' section for more details.
}
1.) Click Run > Edit Configurations.
2.) Click the green '+' in the top left corner and select 'Gradle'.
3.) In the 'Name' field, enter the text: 'Run Tests on AppThwack'.
4.) In the 'Gradle project' field, enter the fully-qualified path to the top level directory of your Android Studio project.
5.) In the 'Tasks' field, enter the text: 'appthwackUpload'.
6.) Hit 'OK'.
7.) Select 'Run Tests on AppThwack' from the build configuration drop down.
8.) Hit play and watch it go.
9.) The task will print out some helpful information and a URL where the scheduled run can be viewed.
1.) cd path/to/my/android/studio/project
2.) ./gradlew appthwackUpload
appthwack {
apiKey='...'
type='junit'
project='My Project Name'
}
appthwack {
apiKey='...'
project='My Project Name'
devicePool='B&N Nooks'
calabash('/src/AndroidApp/tests/calabash/features.zip')
}
appthwack {
apiKey='...'
project='Demo Project'
devicePool='Top 10 devices'
explorer()
}
Name: apiKey
Description: API Key of your AppThwack account. See profile page for details.
Usage: Required
Example:
appthwack {
apiKey="DTOZZNWeCNWFWtuqqJEm14nnonVJMDXA9flmdvzg"
}
Name: project
Description: Name of the AppThwack project to use.
Usage: Required
Example:
appthwack {
//...
project='demoproject'
}
Name: type
Description: Type of test to schedule.
Usage: Optional, default: "junit"
Example:
appthwack {
//...
type='junit'
}
Name: devicePool
Description: Name of the AppThwack device pool to use.
Usage: Optional, default: "Top 10 devices"
Example:
appthwack {
//...
devicePool='Top 25 devices'
}
Name: calabash
Description: Function to schedule Calabash tests. Note: This sets type="calabash".
Usage: Optional
Example:
appthwack {
//...
calabash("/path/to/calabash/features.zip")
}
Name: explorer
Description: Function to schedule AppExplorer tests. Note: This sets type="appexplorer".
Usage: Optional
Example:
appthwack {
//...
explorer()
}
This project uses the appthwack-java client.
Have a question/comment/problem with the Gradle/Android Studio/AppThwack? Open a Github Issue or file a ticket on UserVoice and we'll get back to you as soon as we can.