我正在使用带有机器人和黄瓜的勺子 gradle,我可以截屏并在报告中查看,但日志完全是空的。我错过了什么吗?
我的 Build.gradle:
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.3') {
exclude module: 'guava'
}
classpath 'com.squareup.spoon:spoon-runner:1.2.0'
我的应用程序-build.gradle:
dependencies{
androidTestCompile 'com.squareup.spoon:spoon-client:1.2.0'
androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.5.1'
}
spoon {
debug = true
if (project.hasProperty('spoonFailNoConnectedDevice')) {
failIfNoDeviceConnected = true
}
if (project.hasProperty('cucumberOptions')) {
instrumentationArgs = ["cucumberOptions=" + "'${project.cucumberOptions}'"]
}
}
我正在通过命令行运行,命令是:
gradle spoon -PspoonFailNoConnectedDevice -PcucumberOptions='--tags @smoke'
我的仪表跑步者:
public class Instrumentation extends CucumberInstrumentation {
@Override
public void onStart() {
runOnMainSync(new Runnable() {
@Override
public void run() {
Application app = (Application) getTargetContext().getApplicationContext();
String simpleName = Instrumentation.class.getSimpleName();
// Unlock the device so that the tests can input keystrokes.
((KeyguardManager) app.getSystemService(KEYGUARD_SERVICE)) //
.newKeyguardLock(simpleName) //
.disableKeyguard();
// Wake up the screen.
((PowerManager) app.getSystemService(POWER_SERVICE)) //
.newWakeLock(FULL_WAKE_LOCK | ACQUIRE_CAUSES_WAKEUP | ON_AFTER_RELEASE, simpleName) //
.acquire();
}
});
super.onStart();
}
}
只是日志是空的,可能是什么?有人有想法吗?
谢谢 !