Skip to content

Instantly share code, notes, and snippets.

@shauvik
Created June 1, 2020 19:04
Show Gist options
  • Save shauvik/a8480f6e2f2b0ecaab608579b25cf726 to your computer and use it in GitHub Desktop.
Save shauvik/a8480f6e2f2b0ecaab608579b25cf726 to your computer and use it in GitHub Desktop.
Run android sample
$ git clone https://github.com/android/testing-samples
$ cd testing-samples/ui/espresso/BasicSample
$ ./gradlew cAT
> Configure project :app
WARNING: The option setting 'android.enableUnitTestBinaryResources=true' is experimental and unsupported.
The current default is 'false'
> Task :app:connectedDebugAndroidTest
03:02:35 V/ddms: execute: running am get-config
03:02:37 V/ddms: execute 'am get-config' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:02:37 V/ddms: execute: returning
03:02:37 D/app-debug.apk: Uploading app-debug.apk onto device 'ad0916035056232a0e'
03:02:37 D/Device: Uploading file onto device 'ad0916035056232a0e'
03:02:37 D/ddms: Reading file permision of /Users/sroychoudhary/src/testing-samples/ui/espresso/BasicSample/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
03:02:37 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
03:02:42 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:02:42 V/ddms: execute: returning
03:02:42 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
03:02:42 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:02:42 V/ddms: execute: returning
03:02:42 D/app-debug-androidTest.apk: Uploading app-debug-androidTest.apk onto device 'ad0916035056232a0e'
03:02:42 D/Device: Uploading file onto device 'ad0916035056232a0e'
03:02:42 D/ddms: Reading file permision of /Users/sroychoudhary/src/testing-samples/ui/espresso/BasicSample/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk as: rw-r--r--
03:02:42 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug-androidTest.apk"
03:02:47 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug-androidTest.apk"' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:02:47 V/ddms: execute: returning
03:02:47 V/ddms: execute: running rm "/data/local/tmp/app-debug-androidTest.apk"
03:02:47 V/ddms: execute 'rm "/data/local/tmp/app-debug-androidTest.apk"' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:02:47 V/ddms: execute: returning
03:02:47 I/RemoteAndroidTest: Running am instrument -w -r   com.example.android.testing.espresso.BasicSample.test/androidx.test.runner.AndroidJUnitRunner on SM-G935F - 6.0.1
03:02:47 V/ddms: execute: running am instrument -w -r   com.example.android.testing.espresso.BasicSample.test/androidx.test.runner.AndroidJUnitRunner
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=
03:02:49 V/InstrumentationResultParser: com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest:
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_newActivity
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=1
Starting 4 tests on SM-G935F - 6.0.1
03:02:49 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 1
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=.
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_newActivity
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=1
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 0
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_sameActivity
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=2
03:02:53 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 1
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=.
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_sameActivity
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=2
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 0
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=
03:02:55 V/InstrumentationResultParser: com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest:
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_newActivity
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=3
03:02:55 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 1
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=.
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_newActivity
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=3
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 0
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_sameActivity
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=4
03:02:58 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 1
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: numtests=4
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: stream=.
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: test=changeText_sameActivity
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: class=com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS: current=4
03:03:00 V/InstrumentationResultParser: INSTRUMENTATION_STATUS_CODE: 0
03:03:01 V/InstrumentationResultParser: INSTRUMENTATION_RESULT: stream=
03:03:01 V/InstrumentationResultParser:
03:03:01 V/InstrumentationResultParser: Time: 11.277
03:03:01 V/InstrumentationResultParser:
03:03:01 V/InstrumentationResultParser: OK (4 tests)
03:03:01 V/InstrumentationResultParser:
03:03:01 V/InstrumentationResultParser:
03:03:01 V/InstrumentationResultParser: INSTRUMENTATION_CODE: -1
03:03:01 V/InstrumentationResultParser:
03:03:01 I/XmlResultReporter: XML test result file generated at /Users/sroychoudhary/src/testing-samples/ui/espresso/BasicSample/app/build/outputs/androidTest-results/connected/TEST-SM-G935F - 6.0.1-app-.xml. Total tests 4, passed 4,
03:03:01 V/ddms: execute 'am instrument -w -r   com.example.android.testing.espresso.BasicSample.test/androidx.test.runner.AndroidJUnitRunner' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:03:01 V/ddms: execute: returning
03:03:01 V/ddms: execute: running pm uninstall com.example.android.testing.espresso.BasicSample.test
03:03:02 V/ddms: execute 'pm uninstall com.example.android.testing.espresso.BasicSample.test' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:03:02 V/ddms: execute: returning
03:03:02 V/ddms: execute: running pm uninstall com.example.android.testing.espresso.BasicSample
03:03:03 V/ddms: execute 'pm uninstall com.example.android.testing.espresso.BasicSample' on 'ad0916035056232a0e' : EOF hit. Read: -1
03:03:03 V/ddms: execute: returning
BUILD SUCCESSFUL in 28s
54 actionable tasks: 1 executed, 53 up-to-date
% cat "/Users/sroychoudhary/src/testing-samples/ui/espresso/BasicSample/app/build/outputs/androidTest-results/connected/TEST-SM-G935F - 6.0.1-app-.xml"
<?xml version='1.0' encoding='UTF-8' ?>
<testsuite name="com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest" tests="4" failures="0" errors="0" skipped="0" time="11.277" timestamp="2020-06-01T19:03:01" hostname="localhost">
<properties>
<property name="device" value="SM-G935F - 6.0.1" />
<property name="flavor" value="" />
<property name="project" value="app" />
</properties>
<testcase name="changeText_newActivity" classname="com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest" time="3.349" />
<testcase name="changeText_sameActivity" classname="com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorKtTest" time="2.463" />
<testcase name="changeText_newActivity" classname="com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest" time="2.669" />
<testcase name="changeText_sameActivity" classname="com.example.android.testing.espresso.BasicSample.ChangeTextBehaviorTest" time="2.595" />
</testsuite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment