|
|
(同じ利用者による、間の6版が非表示) |
行1: |
行1: |
− | プロジェクト直下で実行
| + | [[android/kotlin/UnitTest/基本]] |
− | <pre>
| + | |
− | # ローカル単体テスト(tests側)
| + | |
− | $ ./gradlew test
| + | |
− | 34 actionable tasks: 20 executed, 14 up-to-date
| + | |
− | # インストゥルメント化単体テスト(androidTests側)
| + | |
− | $ ./gradlew connectedAndroidTest
| + | |
− | 50 actionable tasks: 30 executed, 20 up-to-date
| + | |
− | </pre>
| + | |
| | | |
− | 公式参考:https://developer.android.com/studio/test/command-line?hl=ja#AMOptionsSyntax
| + | [[android/kotlin/UnitTest/エラー]] |
| | | |
− | ==stopped Daemonsエラーが出る場合==
| + | [[android/kotlin/UnitTest/mockk]] |
− | <pre>
| + | |
− | $ ./gradlew test
| + | |
− | Starting a Gradle Daemon, 1 busy and 1 stopped Daemons could not be reused, use --status for details
| + | |
| | | |
− | > Starting Daemon
| + | [[android/kotlin/UnitTest/AssertThat]] |
| | | |
− | FAILURE: Build failed with an exception.
| + | [[android/kotlin/UnitTest/coroutines]] |
− | | + | |
− | * What went wrong:
| + | |
− | Gradle could not start your build.
| + | |
− | > Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
| + | |
− | > Timeout waiting to lock journal cache (~/.gradle/caches/journal-1). It is currently in use by another Gradle instance.
| + | |
− | Owner PID: 84782
| + | |
− | Our PID: 86617
| + | |
− | Owner Operation:
| + | |
− | Our operation:
| + | |
− | Lock file: ~/.gradle/caches/journal-1/journal-1.lock
| + | |
− | </pre>
| + | |
− | killすれば良い。
| + | |
− | kill -9 84782
| + | |
2021年2月20日 (土) 08:15時点における最新版
android/kotlin/UnitTest/基本
android/kotlin/UnitTest/エラー
android/kotlin/UnitTest/mockk
android/kotlin/UnitTest/AssertThat
android/kotlin/UnitTest/coroutines