问题描述
我把我的项目达与Robolectric运行,在 。
这家精美的各项工作和第一次测试运行和失败。
I set my project up to run with Robolectric and the the gradle-android-test-plugin.This all works fine and first tests are running and failing.
如果测试失败,这也将失败构建的gradle。有没有办法只是让构建下去,并记下评估测试失败在后面的步骤?
If a test fails this will also fail the gradle build. Is there a way to just let the build go on and write down the failing tests for evaluation in a later step?
我们的计划是测试在持续集成服务器整合和那里,如果测试失败构建应该仅是不稳定的。
The plan is to integrate the testing in a continuous integration server and there the build should only be unstable if a test fails.
推荐答案
与AndroidConnectedTests正确的语法如下:
The correct syntax with AndroidConnectedTests is as following:
project.gradle.taskGraph.whenReady {
connectedAndroidTest {
ignoreFailures = true
}
}
现在测试的任务不再被失败的构建,你可以拿起你的构建服务器失败的测试马克特不稳定的构建等。
Now the test task is not failing the build anymore and you can pick up the failed tests with your build server to markt the build as unstable etc.
这篇关于如果测试与gradle这个-Android的测试插件失败不失败的构建的gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!