Increased verbosity of logs for local unit tests

This commit is contained in:
David A. Velasco 2016-05-06 15:38:12 +02:00
parent bfccfa0dac
commit 950dbe2013
3 changed files with 16 additions and 16 deletions

View file

@ -16,12 +16,12 @@ before_install:
script:
# build app and assemble APK, in debug mode
- ./gradlew assembleDebug
# run all the local unit tests
- ./gradlew testDebug
# run all the local unit tests of app module
- ./gradlew :testDebug
# - ./gradlew connectedAndroidTest
# install app, then assemble and install instrumented tests
- ./gradlew installDebug
- ./gradlew installDebugAndroidTest
# install app, then assemble and install instrumented tests of app module
- ./gradlew :installDebug
- ./gradlew :installDebugAndroidTest
# run sample instrumented unit test
- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
env:

View file

@ -75,7 +75,6 @@ public class AuthenticatorActivityTest {
.check(matches(not(isEnabled())));
// Type server url
/*
onView(withId(R.id.hostUrlInput))
.perform(typeText(BuildConfig.TEST_SERVER_URL), closeSoftKeyboard());
onView(withId(R.id.account_username)).perform(click());
@ -88,7 +87,6 @@ public class AuthenticatorActivityTest {
onView(withId(R.id.account_password))
.perform(typeText(BuildConfig.TEST_PASSWORD), closeSoftKeyboard());
onView(withId(R.id.buttonOK)).perform(click());
*/
// Check that login button is now enabled
onView(withId(R.id.buttonOK)).check(matches(isEnabled()));

View file

@ -59,6 +59,13 @@ dependencies {
}
tasks.withType(Test) {
/// increased logging for tests
testLogging {
events "passed", "skipped", "failed"
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
@ -66,9 +73,9 @@ android {
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments TEST_USER: "${TEST_USER}"
testInstrumentationRunnerArguments TEST_PASSWORD: "${TEST_PASSWORD}"
testInstrumentationRunnerArguments TEST_SERVER_URL: "${TEST_SERVER_URL}"
buildConfigField "String", "TEST_USER", "\"${TEST_USER}\""
buildConfigField "String", "TEST_PASSWORD", "\"${TEST_PASSWORD}\""
buildConfigField "String", "TEST_SERVER_URL", "\"${TEST_SERVER_URL}\""
}
// adapt structure from Eclipse to Gradle/Android Studio expectations;
@ -113,10 +120,5 @@ android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}