cucumber-jvm javadocs指出glue元素的用途是指定stepdefinitions和hooks的位置。但是,這似乎不適用於我。可以說,我在目錄a中有我的功能,而在目錄b中有我的步驟定義。然後,黃瓜選項註釋
@Cucumber.Options(
features= "directory_a",
glue="directory_b"
)
將從directory_a加載我有文件,但是,它不會從directly_b載入我的步驟定義。但是,如果我使用
@Cucumber.Options(
features= {"directory_a", "directory_b"}
)
那麼我的功能從directory_a被加載,我的步驟定義從directory_b也被拿起。這正是我想要的,但是,我不明白爲什麼前者不工作?我猜它與它有關,期待URI的格式不同(也許我需要預先安裝一個類路徑://或類似的東西),但我在文檔中找不到關於此的任何信息。
@ Cucumber.Options現在已過時,使用[CucumberOptions(http://cukes.info/api/cucumber/jvm/javadoc/cucumber/api/CucumberOptions.html) – Geert
我想紀念這個問題已經過時。 –