0
我目前正在嘗試使用此庫在android上運行ui測試。對目錄的根目錄如何運行取決於測試任務的定製gradle插件
./gradlew verifyMode screenshotTests
: https://github.com/facebook/screenshot-tests-for-android
我使用運行測試。
然而,所有我想運行是:
./gradlew test
而且我想它運行的截圖測試以及我的UI測試。這可能是待辦事項嗎?我當前的構建文件:
buildscript {
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.facebook.testing.screenshot:plugin:0.4.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.facebook.testing.screenshot'
android {
compileSdkVersion 24
buildToolsVersion '24.0.3'
defaultConfig {
applicationId "sample"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "sample.TestRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.0'
compile project(':library')
androidTestCompile 'com.android.support.test:runner:0.4'
androidTestCompile 'com.azimolabs.conditionwatcher:conditionwatcher:0.1'
androidTestCompile 'com.android.support.test:rules:0.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.0'
androidTestCompile 'com.google.dexmaker:dexmaker:1.0'
androidTestCompile 'org.mockito:mockito-core:1.10.17'
androidTestCompile 'com.android.support:support-annotations:24.2.1'
}