BDD安卓测试多口味安卓应用无法使用。

问题描述 投票:2回答:1

我正在使用Cucumber框架(BDD)测试一个包含产品口味的Android应用程序,我使用Cucumber Instrumentation runner来运行这些功能,我开始测试其中一个口味,但我得到了以下错误。

没有找到测试。这通常意味着你的测试类不是我们测试运行器所期望的形式(例如没有继承自 TestCase 或缺乏 @Test 注释)

指挥部 :

gradlew connectedAndroidTest -Dtags="@login"

出现以下错误。

adb shell am instrument -w -r   -e debug false -e class com.example.gviswa200.myapplication.cucumber.steps.StepDefinitions com.example.gviswa200.myapplication.flavor1.test/com.example.gviswa200.myapplication.cucumber.runner.CucumberTestRunner

Error:
Test running failed: Instrumentation run failed due to 'cucumber.runtime.CucumberException'
Empty test suite.

我知道这个错误是由于 CucumberTestCase.java 跑者不接 CucumberTestRunner导致 CucumberException. 但我确实改变了路径的 CucumberTestCase.java 文件多次,但我还是得到了同样的错误。

这是我的android项目示例repo。 https:/github.comvsgopinathAppWithFlavors。

我已经根据参考项目构建了这个项目。 https:/github.comsebaslogenCleanGUITestArchitecture。

如果需要更多信息,请告诉我。

android android-testing cucumber-jvm
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.