- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 CLI 在模拟器中运行仪器测试(Espresso),以使用快速 channel /屏幕抓取生成我们的应用程序的屏幕截图。该应用程序基于 IONIC Cordova。
在 Android Studio 中执行我的 Espresso 测试时,它会记录:
Testing started at 16:34 ...
07/30 16:34:29: Launching MainActivityTest
$ adb push /Users/administrator/Jenkins/workspace/generatescreenshots/app/platforms/android/app/build/outputs/apk/debug/app-debug.apk /data/local/tmp/de.konzeptix.test.app
$ adb shell pm install -t -r "/data/local/tmp/de.konzeptix.test.app"
Success
$ adb push /Users/administrator/Jenkins/workspace/generatescreenshots/app/platforms/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk /data/local/tmp/de.konzeptix.test.app.test
$ adb shell pm install -t -r "/data/local/tmp/de.konzeptix.test.app.test"
Success
Running tests
$ adb shell am instrument -w -r -e debug false -e class 'de.konzeptix.test.app.test.MainActivityTest' de.konzeptix.test.app.test/android.support.test.runner.AndroidJUnitRunner
Client not ready yet..
Started running tests
Tests ran to completion.
00:03:06.842 +----------------------------+---------------------------------------------------------------------------------------+
00:03:06.843 | Detected Values from './fastlane/Screengrabfile' |
00:03:06.844 +----------------------------+---------------------------------------------------------------------------------------+
00:03:06.845 | app_package_name | de.konzeptix.test.app |
00:03:06.845 | tests_package_name | de.konzeptix.test.app.test |
00:03:06.846 | use_tests_in_classes | ["de.konzeptix.test.app.test.MainActivityTest.java"] |
00:03:06.847 | app_apk_path | ./platforms/android/app/build/outputs/apk/debug/app-debug.apk |
00:03:06.847 | tests_apk_path | ./platforms/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk |
00:03:06.848 | locales | ["de-DE"] |
00:03:06.849 | launch_arguments | ["'shot0 topsBtn'", " 'shot1 articlesBtn'", " 'shot2 eventsBtn'"] |
00:03:06.850 | device_type | phone |
00:03:06.850 | clear_previous_screenshots | true |
00:03:06.851 +----------------------------+---------------------------------------------------------------------------------------+
00:03:06.852
00:03:06.852
00:03:06.853 +-----------------------------+---------------------------------------------------------------------------------------+
00:03:06.854 | Summary for screengrab 2.99.1 |
00:03:06.869 +-----------------------------+---------------------------------------------------------------------------------------+
00:03:06.870 | android_home | /Users/administrator/Library/Android/sdk |
00:03:06.870 | locales | ["de-DE"] |
00:03:06.870 | clear_previous_screenshots | true |
00:03:06.870 | output_directory | fastlane/metadata/android |
00:03:06.871 | skip_open_summary | false |
00:03:06.871 | app_package_name | de.konzeptix.test.app |
00:03:06.871 | tests_package_name | de.konzeptix.test.app.test |
00:03:06.872 | use_tests_in_classes | ["de.konzeptix.test.app.test.MainActivityTest.java"] |
00:03:06.872 | launch_arguments | ["'shot0 topsBtn'", " 'shot1 articlesBtn'", " 'shot2 eventsBtn'"] |
00:03:06.872 | test_instrumentation_runner | android.support.test.runner.AndroidJUnitRunner |
00:03:06.872 | ending_locale | en-US |
00:03:06.873 | app_apk_path | ./platforms/android/app/build/outputs/apk/debug/app-debug.apk |
00:03:06.873 | tests_apk_path | ./platforms/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk |
00:03:06.873 | device_type | phone |
00:03:06.874 | exit_on_test_failure | true |
00:03:06.874 | reinstall_app | false |
00:03:06.874 +-----------------------------+---------------------------------------------------------------------------------------+
00:03:06.874
00:03:06.949 Clearing phoneScreenshots within fastlane/metadata/android
00:03:06.951 $ /Users/administrator/Library/Android/sdk/platform-tools/adb devices -l
00:03:06.960 ▸ List of devices attached
00:03:06.966 ▸ emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:1
00:03:06.974 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell echo \$EXTERNAL_STORAGE
00:03:06.981 ▸ /sdcard
00:03:06.988 Cleaning screenshots on device
00:03:07.000 ls: /sdcard/de.konzeptix.test.app/screengrab: No such file or directory
00:03:07.001 Exit status: 1
00:03:07.021 ls: /data/data/de.konzeptix.test.app/app_screengrab: Permission denied
00:03:07.022 Exit status: 1
00:03:07.025 Validating app APK
00:03:07.026 $ /Users/administrator/Library/Android/sdk/build-tools/28.0.1/aapt dump permissions ./platforms/android/app/build/outputs/apk/debug/app-debug.apk
00:03:07.032 ▸ package: de.konzeptix.test.app
00:03:07.036 ▸ uses-permission: name='android.permission.DISABLE_KEYGUARD'
00:03:07.040 ▸ uses-permission: name='android.permission.WAKE_LOCK'
00:03:07.045 ▸ uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
00:03:07.049 ▸ uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
00:03:07.052 ▸ uses-permission: name='android.permission.CHANGE_CONFIGURATION'
00:03:07.054 ▸ uses-permission: name='android.permission.INTERNET'
00:03:07.057 ▸ uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
00:03:07.059 ▸ uses-permission: name='android.permission.READ_PHONE_STATE'
00:03:07.062 ▸ uses-permission: name='com.sec.android.provider.badge.permission.READ'
00:03:07.065 ▸ uses-permission: name='com.sec.android.provider.badge.permission.WRITE'
00:03:07.067 ▸ uses-permission: name='com.htc.launcher.permission.READ_SETTINGS'
00:03:07.070 ▸ uses-permission: name='com.htc.launcher.permission.UPDATE_SHORTCUT'
00:03:07.072 ▸ uses-permission: name='com.sonyericsson.home.permission.BROADCAST_BADGE'
00:03:07.075 ▸ uses-permission: name='com.anddoes.launcher.permission.UPDATE_COUNT'
00:03:07.077 ▸ uses-permission: name='com.majeur.launcher.permission.UPDATE_BADGE'
00:03:07.080 ▸ uses-permission: name='com.google.android.providers.gsf.permission.READ_GSERVICES'
00:03:07.081 ▸ uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
00:03:07.083 ▸ uses-permission: name='com.google.android.c2dm.permission.RECEIVE'
00:03:07.084 ▸ permission: de.konzeptix.test.app.permission.C2D_MESSAGE
00:03:07.086 ▸ uses-permission: name='de.konzeptix.test.app.permission.C2D_MESSAGE'
00:03:07.087 Installing app APK
00:03:07.088 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -t -r ./platforms/android/app/build/outputs/apk/debug/app-debug.apk
00:03:07.447 ▸ Success
00:03:07.449 Installing tests APK
00:03:07.450 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -t -r ./platforms/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
00:03:08.115 ▸ Success
00:03:08.122 Granting the permission necessary to change locales on the device
00:03:08.124 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm grant de.konzeptix.test.app android.permission.CHANGE_CONFIGURATION
00:03:08.302 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop ro.build.version.sdk
00:03:08.328 ▸ 28
00:03:08.349 Granting the permissions necessary to access device external storage
00:03:08.350 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm grant de.konzeptix.test.app android.permission.WRITE_EXTERNAL_STORAGE
00:03:08.413 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm grant de.konzeptix.test.app android.permission.READ_EXTERNAL_STORAGE
00:03:08.462 Running tests for locale: de-DE
00:03:08.464 $ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument --no-window-animation -w \
00:03:08.467 -e testLocale de_DE \
00:03:08.468 -e endingLocale en_US \
00:03:08.468 -e class de.konzeptix.test.app.test.MainActivityTest.java \
00:03:08.468 -e 'shot0 topsBtn' -e 'shot1 articlesBtn' -e 'shot2 eventsBtn' \
00:03:08.469 de.konzeptix.test.app.test/android.support.test.runner.AndroidJUnitRunner
00:03:09.116 ▸ de.konzeptix.test.app.test.MainActivityTest.java:
00:03:09.123 ▸ Error in de.konzeptix.test.app.test.MainActivityTest.java:
00:03:09.130 ▸ java.lang.ClassNotFoundException: de.konzeptix.test.app.test.MainActivityTest.java
00:03:09.137 ▸ at java.lang.Class.classForName(Native Method)
00:03:09.143 ▸ at java.lang.Class.forName(Class.java:453)
00:03:09.150 ▸ at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:72)
00:03:09.157 ▸ at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
00:03:09.164 ▸ at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:789)
00:03:09.172 ▸ at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:539)
00:03:09.179 ▸ at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:382)
00:03:09.186 ▸ at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)
00:03:09.193 ▸ Caused by: java.lang.ClassNotFoundException: Didn't find class "de.konzeptix.test.app.test.MainActivityTest.java" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/base.apk", zip file "/data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/base.apk"],nativeLibraryDirectories=[/data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/lib/x86, /data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/lib/x86, /data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/base.apk!/lib/x86, /data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/base.apk!/lib/x86, /system/lib]]
00:03:09.207 ▸ at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
00:03:09.211 ▸ at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
00:03:09.214 ▸ at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
00:03:09.216 ▸ ... 8 more
00:03:09.274 ▸ Time: 0.014
00:03:09.281 ▸ There was 1 failure:
00:03:09.287 ▸ 1) de.konzeptix.test.app.test.MainActivityTest.java
00:03:09.294 ▸ java.lang.ClassNotFoundException: de.konzeptix.test.app.test.MainActivityTest.java
00:03:09.301 ▸ at java.lang.Class.classForName(Native Method)
00:03:09.309 ▸ at java.lang.Class.forName(Class.java:453)
00:03:09.315 ▸ at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:72)
00:03:09.322 ▸ at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
00:03:09.330 ▸ at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:789)
00:03:09.334 ▸ at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:539)
00:03:09.338 ▸ at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:382)
00:03:09.342 ▸ at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)
00:03:09.346 ▸ Caused by: java.lang.ClassNotFoundException: Didn't find class "de.konzeptix.test.app.test.MainActivityTest.java" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/base.apk", zip file "/data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/base.apk"],nativeLibraryDirectories=[/data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/lib/x86, /data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/lib/x86, /data/app/de.konzeptix.test.app.test-uaWS_ap-9oK2KRdJOAlBJg==/base.apk!/lib/x86, /data/app/de.konzeptix.test.app-BROFUx3GSnQkL4K7pknnyw==/base.apk!/lib/x86, /system/lib]]
00:03:09.354 ▸ at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
00:03:09.358 ▸ at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
00:03:09.361 ▸ at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
00:03:09.361 ▸ ... 8 more
00:03:09.363 ▸ FAILURES!!!
00:03:09.364 ▸ Tests run: 1, Failures: 1
最佳答案
由于 faSTLane screengrab 将这两个应用程序安装到设备上,我无法清楚地看到安装和运行仪器测试的 Android Studio 过程有任何重大差异,我尝试使用 faSTLane screengrab use_tests_in_packages 的另一个选项而不是 use_tests_in_class,它转换为cli调用
$ /Users/administrator/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument --no-window-animation -w \
-e testLocale de_DE \
-e endingLocale en_US \
-e package de.konzeptix.test.app.test \
-e shot0 topsBtn -e shot1 articlesBtn -e shot2 eventsBtn -e shot3 galleriesBtn -e shot4 productsBtn -e shot5 faqBtn -e shot6 companyBtn -e shot7 contactsBtn \
de.konzeptix.test.app.test/android.support.test.runner.AndroidJUnitRunner
关于gradle - java.lang.ClassNotFoundException : Didn't find class “xxx.xxx.MainActivityTest.java” on path: DexPathList,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51596743/
我只想知道它们之间的区别: .class .class{ font-size:14px; } 对比: .class > .class{ font-size:14px; } 是一样的东西吗? 最佳答案
PrimeFaces 文档的以下摘录使标题中描述的两个选择器之间似乎存在差异: .ui-widget, .ui-widget .ui-widget { font-size: 90% !imp
我正在尝试选择特定值。但我遇到了一个问题。 我有两个元素,一个有 X Y,另一个有 X Y Z。 当选择 X Y Z 时,我也收到 X Y 的值...有没有办法让它寻找 X AND Y AND Z 而
.class.class 和 .class .class 有什么区别? 最佳答案 .class .class 匹配类 .class 的任何元素,这些元素是类 .class< 的另一个元素的后代/. .
我正在研究 Classname.class 和 Classname.class.toString() 并发现了一些不寻常的东西。 .class 在同一个类上运行时似乎等同于 .class。尽管 .cl
我试图在Dart中扩展列表并在此列表中使用另一个类。 这是我的示例,其中注释出了问题: import "Radio.dart"; // extends ListBase { List ra
我有一个很大的“经理”类,我认为它做得太多了,但我不确定如何将它划分为更多逻辑单元。 一般来说类主要由以下方法组成: class FooBarManager{ GetFooEntities();
我在一个文件中定义了一个抽象父类(super class),在另一个文件中定义了一个子类。我需要父类(super class)文件和堆栈跟踪报告来找到一个包含它。 但是,当它到达“extends”行时
我在 A. Alexenderscu 的现代 C++ 设计中找到了一些模板示例 作者使用以下行的地方 template class CheckingPolicy // class SmartPt
看一下这段代码: public static class A { public void doA() { } } public static class B extends A {
我有两个具有 .body 类的 div,但是,一个位于另一个具有 .box 类的 div 中 - 如下所示: 我只想为 .box 内部的 .body 设置样式...但我在下面所
我一定是遗漏了 C++ 规范中的某些内容,因为我无法解释为什么以下代码可以成功编译: class MyClass { static void fun(); }; int main() { MyClas
我正在尝试在 python 中“模拟”命名空间。我使用内部和外部类层次结构来创建我的命名空间。例如,您希望将文件(如资源)的路径保存在一个位置。我试过这样的事情: src = #path to sou
在试验 online crystal compiler 时(这太棒了),我遇到了一个我似乎无法找到解释的错误: class Person class Current < self end
在查看我的一段代码时,我陷入了如下的一条语句。 TMyObjectClass = TMyObject 类; 我有点困惑,不知道这句话是什么意思。由于 TMyObjectClass 在该语句上方没有声明
我正在编写一个简单的应用程序,以学习一些基本的Dart编程,但无法弄清楚其结构和包含的内容-我得到了一个重复的类Point 首先,我有一个叫做MouseTrack的主类。它将初始化列表并产生循环。 #
在 org.springframework.core.SerializableTypeWrapper (版本 5.2.3),第 112 行有以下代码: if (GraalDetector.in
我希望将鼠标悬停在子导航中的列表项上,以激活页面上该类别中所有项的类(不仅仅是父元素或同级元素)。有任何想法吗?这是我的意思的一个例子: img.BLUE {border:1px solid #FF
我正在通过 ClassLoader 加载类: Class clazz = urlClassLoader.loadClass(name.substring(0, name.length() - 6).r
以下简化的类在从 get() 返回值时执行不同的操作,具体取决于该类是被赋予 double 值还是数组作为模板参数: #include "array" #include "type_traits" t
我是一名优秀的程序员,十分优秀!