Cucumber:是否可以从 android 设备上的文件夹中读取 .feature 文件?

Cucumber: Is it possible to read .feature files from a folder on the android device?

我使用 Cucumber 来测试我的 android 应用程序。通过 CucumberOptions,我定义了功能文件(测试文件)所在的位置。在此示例中,文件位于 'assets/tests/*' 文件夹中。

@CucumberOptions(features = ["tests"], glue = ["com.myapp.cucumber.steps"])
class CucumberTestCase

是否可以为位于设备(例如 sdcard)上的功能文件定义另一个文件夹?

如果有人可以将功​​能文件复制到设备上的特定文件夹,并且当 运行 cucumber 测试时,这些文件也将由 cucumber 执行,那就太好了。

@CucumberOptions(features = *yourpath*)

您可以指定任何文件夹。

喜欢: @CucumberOptions(features = sdcard/features)

github 上已经有针对此问题的拉取请求。 https://github.com/cucumber/cucumber-android/issues/32

因此目前无法加载不在资产文件夹中的特征文件。但希望很快。