1

Spoon を Gradle で動作させようとしているので、次のプラグインを使用します。

https://github.com/stanfy/spoon-gradle-plugin

UI テストの作成には Espresso を使用しています

基本的には動作しているようです。コマンド ラインから gradle タスクを開始できます。接続されているデバイスが検出され、レポートも作成されます。

失敗するだけで、レポートにエラーメッセージが表示されます。

「java.lang.RuntimeException」が原因でインストルメンテーションの実行に失敗しました

私のコンソール出力:

02:28:59 D/app-myproject-debug.apk: Uploading app-myproject-debug.apk onto device '1fd0b003'
02:28:59 D/Device: Uploading file onto device '1fd0b003'
02:29:06 D/app-myproject-debug-test-unaligned.apk: Uploading app-myproject-debug-test-unaligned.apk onto device '1fd0b003'
02:29:07 D/Device: Uploading file onto device '1fd0b003'
2014-08-07 14:29:14 [SDR.run] About to actually run tests for [1fd0b003]
02:29:14 I/RemoteAndroidTest: Running am instrument -w -r  com.bonial.myproject.test/com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner on samsung-sm_n9005-1fd0b003
02:29:27 I/InstrumentationResultParser: test run failed: 'Instrumentation run failed due to 'java.lang.IllegalStateException''
2014-08-07 14:29:27 [STRL.testRunStarted] testCount=0 runName=com.bonial.myproject.test
2014-08-07 14:29:27 [STRL.testRunFailed] errorMessage=Instrumentation run failed due to 'java.lang.IllegalStateException'
2014-08-07 14:29:27 [STRL.testRunEnded] elapsedTime=0
02:29:27 I/XmlResultReporter: XML test result file generated at /Users/daniel/android/app/build/spoon/myproject/debug/junit-reports/1fd0b003.xml. Total tests 0, Failed 0, Error 0
2014-08-07 14:29:27 [SDR.run] About to grab screenshots and prepare output for [1fd0b003]
2014-08-07 14:29:27 [SDR.run] Pulling screenshots from [1fd0b003] /data/data/com.packagename.myproject/app_spoon-screenshots
2014-08-07 14:29:27 [SR.runTests] [1fd0b003] Execution done.
02:29:30 D/ddms: Waiting for Monitor thread
:app:spoonMyprojectDebugTest FAILED
4

0 に答える 0