mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-22 07:39:53 +01:00
First prototype of Espresso test infrastructure with automatic screenshoting
This commit is contained in:
@@ -49,6 +49,14 @@ dependencies {
|
||||
testImplementation "org.jmock:jmock-legacy:2.8.2"
|
||||
testImplementation "org.hamcrest:hamcrest-library:1.3"
|
||||
testImplementation "org.hamcrest:hamcrest-core:1.3"
|
||||
|
||||
def espressoVersion = '3.0.2'
|
||||
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
|
||||
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:$espressoVersion"
|
||||
androidTestImplementation "tools.fastlane:screengrab:1.1.0"
|
||||
androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:2.0.2"
|
||||
androidTestCompileOnly 'javax.annotation:jsr250-api:1.0'
|
||||
androidTestImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
dependencyVerification {
|
||||
@@ -248,6 +256,7 @@ android {
|
||||
def now = (long) (System.currentTimeMillis() / 1000)
|
||||
buildConfigField "Long", "BuildTimestamp",
|
||||
"${getStdout(['git', 'log', '-n', '1', '--format=%ct'], now)}000L"
|
||||
testInstrumentationRunner 'org.briarproject.briar.android.test.BriarTestRunner'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -260,6 +269,13 @@ android {
|
||||
crunchPngs false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
screenshot {
|
||||
initWith debug
|
||||
applicationIdSuffix ".screenshot"
|
||||
resValue "string", "app_package", "org.briarproject.briar.android.screenshot"
|
||||
resValue "string", "app_name", "Briar Screenshot"
|
||||
testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt', 'proguard-test.txt'
|
||||
}
|
||||
release {
|
||||
shrinkResources false
|
||||
minifyEnabled true
|
||||
@@ -268,6 +284,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
testBuildType "screenshot"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
|
||||
Reference in New Issue
Block a user