草庐IT

test-Info

全部标签

安卓 Espresso : "No test were found" , "Process crashed"

当使用Espresso测试我的Android应用程序时,我注意到运行配置有AllinModule的AndroidTest找不到测试,而运行AllinPackage成功。我创建了以下可重现的案例:使用向导使用minSdk8和空Activity创建新的干净应用使用espresso依赖项等配置gradle(见下文)使用选项AllinModule和一个带有AllinPackage的选项创建AndroidTestRunConfiguration添加带有测试的类(见下文)使用AllinPackage运行:测试通过使用AllinModule运行:未找到测试使用AllinModule运行直到几天前都运

安卓工作室 : Testing: Library dependencies that have been compiled using java 8 or above

请帮忙。我在为androidstudio设置测试时遇到了非常糟糕的时间。我已经从cucumbergithub下载了计算器示例来练习cumcumber代码测试。https://github.com/cucumber/cucumber-jvm/tree/master/android(顺便说一句,其中一些品牌的名字非常奇怪)我尝试将它与AndroidStudio一起使用。该程序运行完美(耶!)。然而,测试没有。我有一个非常可怕的消息,每次运行它时都会困扰我。*Torundexinprocess,theGradledaemonneedsalargerheap.Itcurrentlyhasapp

android - 神秘错误 : "Failed to open database phenotype.db, database is locked." Can't find any info online

我正在尝试测试一个应用程序,但它无法启动,反而我不断收到此错误:Failedtoopendatabase'/data/data/com.google.android.gms/databases/phenotype.db'.android.database.sqlite.SQLiteDatabaseLockedException:databaseislocked(code5):,whilecompiling:PRAGMAjournal_mode我在网上找不到关于这个错误的任何信息,也没有关于phenotype.db做什么的信息。当我测试这个时,我没有做任何与数据库相关的事情;我所做的唯一

android - Gradle Android 测试不支持过滤器 (--tests)

GradleAndroid测试不支持过滤器(--tests)。gradlewtest--testscom.example.test.*有效。gradlewconnectedAndroidTest--testscom.example.test.*错误:未知的命令行选项“--tests”。 最佳答案 要运行特定的AndroidJUnit4测试,提供仪器运行器是gradle所必需的。尝试这种格式:./gradlewapp:connectedAndroidTest-Pandroid.testInstrumentationRunnerArgu

android - 如何制作android :usesCleartextTraffic ="true" only for instrumentation tests?

我正在使用RESTMock用于我的仪器测试,但它仅在我设置usesCleartextTraffic时有效在我的list中为true。不过,我只希望仪器测试也是如此。有办法吗?我尝试在androidTest文件夹中创建一个新的list文件。测试运行但失败,如usesCleartextTraffic仍然是false。我知道RESTMock从版本0.3.2开始支持https,但我宁愿不必处理它。我实际上是按照他们的指南操作的,结果遇到了来自OkHttp3的错误:java.lang.AssertionError:java.security.NoSuchAlgorithmException:BC

安卓测试 : Target app vs Test app?

谁能给我解释一下目标应用Context和测试应用Context之间的区别?YoucanusetheInstrumentationRegistryclasstoaccessinformationrelatedtoyourtestrun.ThisclassincludestheInstrumentationobject,targetappContextobject,testappContextobject,andthecommandlineargumentspassedintoyourtest.Android开发人员指南的以下摘录(此处:https://developer.android.

sdk - flutter 包失败取决于来自 sdk 的 flutter_test any,它需要 SDK 版本 <2.0.0,版本解决失败

我创建了一个flutter项目,运行flutterpackagesget,输出如下:【二】flutter包搞定等待另一个flutter命令释放启动锁...第二次运行“flutterpackagesget”...当前的DartSDK版本是2.0.0-dev.63.0.flutter-4c9689c1d2。Becauseseconddependsonflutter_testanyfromsdkwhichrequiresSDKversionflutter医生-vPSD:\dartstudy\second>flutterdoctor-v[√]Flutter(Channeldev,v0.5.7,

sdk - flutter 包失败取决于来自 sdk 的 flutter_test any,它需要 SDK 版本 <2.0.0,版本解决失败

我创建了一个flutter项目,运行flutterpackagesget,输出如下:【二】flutter包搞定等待另一个flutter命令释放启动锁...第二次运行“flutterpackagesget”...当前的DartSDK版本是2.0.0-dev.63.0.flutter-4c9689c1d2。Becauseseconddependsonflutter_testanyfromsdkwhichrequiresSDKversionflutter医生-vPSD:\dartstudy\second>flutterdoctor-v[√]Flutter(Channeldev,v0.5.7,

javascript - undefined is not object (evaluating 'RNDeviceInfo.deviceId') - react-native-device-info 错误

我正在使用react-native-device-info库,它适用于iOS模拟器。但对于Android,我收到一个错误:undefinedisnotobject(evaluating'RNDeviceInfo.deviceId')可能是什么问题?我按照图书馆页面指南中的描述安装了它(使用rnpm)。然后在componentWillMount()中我试图获取设备ID:importDeviceInfofrom'react-native-device-info';...componentWillMount(){letclientId=DeviceInfo.getUniqueID();}

安卓 Wifip2p : Why is group info null after connecting to group owner

我正在尝试将多个设备连接到我手动选择的组所有者我希望同伴在找到他后手动连接到组所有者我有3部手机(没有模拟器),每部手机上都有一个带有此点击处理程序的“创建群组”按钮publicvoidcreateWifiGroup(Viewview){mManager.createGroup(mChannel,newWifiP2pManager.ActionListener(){@OverridepublicvoidonSuccess(){mManager.requestGroupInfo(mChannel,newMyGroupInfoListener(MainActivity.this));}@O