找到你要的答案

Q:Suppress android test based on device type?

Q:基于设备类型的Android测试?

I run an Instrumentation test suite using Gradle 'connectedCheck' which executes tests on all connected devices. Some tests fail only on certain devices and I want a mechanism to suppress/ignore those tests only for that device.

Can anyone tell me a best way to do it? I am looking into JUnit test rules but wondering if Android provides any API to achieve in a simpler fashion.

我用的connectedcheck摇篮”执行测试所有连接的设备仪器的测试套件。有些测试只在某些设备上失败,我希望有一个机制来抑制/忽略那些仅针对该设备的测试。

谁能告诉我一个最好的方法?我看着JUnit测试规则,但不知道Android提供任何API更简单的实现方式。

android  junit-runner  junit-rule