草庐IT

Full_Names_Test

全部标签

android - 如果 gradle-android-test-plugin 测试失败,不要让 gradle 构建失败

我将我的项目设置为使用Robolectric和gradle-android-test-plugin运行.这一切工作正常,第一个测试正在运行但失败了。如果测试失败,这也将导致gradle构建失败。有没有办法让构建继续进行,并记下失败的测试以供后续步骤评估?计划是将测试集成到持续集成服务器中,只有在测试失败时构建才会不稳定。 最佳答案 嗯。好吧,我认为你有两个选择。一种是使用testTask.ignoreFailures=true当测试失败时不让任务失败。另一种方法是使用“--continue”运行gradle命令。这将执行尽可能多的任

android - 没有找到类 "android.support.test.runner.AndroidJUnitRunner"

我正在尝试使用插桩测试,并将我的项目更新为AndroidX。但是在尝试运行时出现以下错误:2018-10-0914:22:29.46813263-13263/xxx.yyyE/AndroidRuntime:FATALEXCEPTION:mainProcess:xxx.yyy,PID:13263java.lang.RuntimeException:UnabletoinstantiateinstrumentationComponentInfo{xxx.yyy.test/android.support.test.runner.AndroidJUnitRunner}:java.lang.Cla

android - java.lang.SecurityException : Permission Denial: getIntentSender() when using UiAutomation in a test 错误

每当我尝试使用UiAutomation在通过getInstrumentation().getUiAutomation()进行的任何测试中,进程崩溃并出现以下异常:java.lang.SecurityException:PermissionDenial:getIntentSender()frompid=30334,uid=2000,(needuid=1000)isnotallowedtosendaspackageandroidatandroid.os.Parcel.readException(Parcel.java:1540)atandroid.os.Parcel.readExcepti

android - 测试运行失败 : Test run failed to complete. 预期 1 次测试,收到 0

我尝试为我的应用启动JUnit测试(robotium):publicclassMainTestextendsActivityInstrumentationTestCase2{privateSolosolo;publicMainTest(){super("nix.android.contact",MainActivity.class);//TODOAuto-generatedconstructorstub}protectedvoidsetUp()throwsException{super.setUp();solo=newSolo(getInstrumentation(),getActiv

android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

我刚刚将build.gradle编译SDK更新为27API。compileSdkVersion27buildToolsVersion'27.0.3'targetSdkVersion27但是一旦我点击同步按钮它就​​会抛出error:resourcestyle/TextAppearance.Compat.Notification.Info(aka{packageId}.test:style/TextAppearance.Compat.Notification.Info)notfound.error:resourcestyle/TextAppearance.Compat.Notificat

android - 在 Android Studio 项目上找不到参数的方法 test()

在我的Android应用程序中,我想在包中排除一些测试用例,以便我在build.gradle文件中使用test任务。例如:applyplugin:'com.android.library'test{exclude'**/calltest/Summary.class'}如果同步项目我得到以下异常:*Whatwentwrong:Aproblemoccurredevaluatingproject':SdkModule'.>Couldnotfindmethodtest()forarguments[build_4g3vf7b615x3x1p7i9ty0pt1l$_run_closure1@73d

android - MultiDexTestRunner 的哪个包? android.support.multidex 或 com.android.test.runner

页面http://developer.android.com/tools/building/multidex.html#testing建议dependencies{compile'com.android.support:multidex:1.0.1'androidTestCompile'com.android.support:multidex-instrumentation:1.0.1'}android{defaultConfig{multiDexEnabledtruetestInstrumentationRunner"android.support.multidex.MultiDex

android - Xamarin : No resource found that matches the given names (AppCompat)

我在Azure上部署了一个虚拟机。我已经安装了VisualStudio2015、Xamarin和其他移动开发工具。我在本地计算机上进行了相同的设置,以通过VisualStudio在我的设备上测试我的应用唯一的区别是AndroidSDK的安装。在我的本地机器上,我没有图像系统。我在我的虚拟机上开发了一个应用程序。我在编译期间没有错误。我使用Android.Support.Design、Android.Support.V4、Android.Support.V7.AppCompat、Android.Support.V7.RecyclerView(NuGet的最新版本)及其MvvmCross实

c++ - 在 "test mode"中打印信息,但不在 "normal execution"中打印信息

我正在使用c++中的应用程序,它使用特殊的dprintf函数来打印信息,这是一个示例:dprintf(verbose,"Thevalueis:%d",i);我正在做的是,当我出于测试目的定义冗长然后打印信息时,当我在正常执行中工作时我没有定义它并且我没有在屏幕上看到无用的信息。我的问题是如何执行该功能或实现相同的想法? 最佳答案 我尽量避免使用var-argC风格的函数,主要原因有两个:它们不是类型安全的,不能使用运算符他们无法识别何时提供的论点太少或太多我创建了一种使用boost::fusion的方法,它以类型安全的方式提供参数。

c++ - CPPUnit 中测试套件属性使用的示例是什么? (CPPUNIT_TEST_SUITE_PROPERTY)

我加入了一个使用CPPUnit进行单元测试的项目,并将添加一些可能共享设置和拆卸代码的测试。在对此进行更多研究时,我遇到了CPPUNIT_TEST_SUITE_PROPERTY(来自https://people.freedesktop.org/~mmohrhard/cppunit/group___writing_test_fixture.html)它的描述说Addsapropertytothetestsuitebuildercontext.http://cppunit.sourceforge.net/doc/cvs/group___writing_test_fixture.html说如