我正在經歷在Windows上設置和運行behat的過程。安裝和設置成功的地方,現在試圖從CMD運行時我得到:在試圖針對功能運行Behat時,情況和步驟被報告爲未定義。
2 scenarios (2 undefined)
8 steps (8 undefined)
0m0.081s
You can implement step definitions for undefined steps with these snippets:
/**
* @Given /^I am on "([^"]*)"$/
*/
public function iAmOn($arg1)
{
throw new PendingException();
}
依此類推。
我運行命令:
F:\Program_Files\Behat\bin>Behat F:\Program_Files\Behat\vendor\behat\mink-extension\features\search.feature
我認爲是沒有達到一定的資源,所以在所有相關的目錄:
Behat: "F:\Program_Files\Behat\bin\"
Features: "F:\Program_Files\Behat\vendor\behat\mink-extension\features\"
Feature context: "F:\Program_Files\Behat\bin\features\bootstrap\FeatureContext.php"
Behat config: "F:\Program_Files\Behat\bin\behat.yml"
嘗試放置的特徵文件這裏:「F:\ Program_Files \ Behat \ bin \ features \ search.feature」 給出相同的輸出。
請讓我知道,如何成功地運行behat指定的* .feature文件。謝謝。
UPDATE:
當我運行「>貝哈特-dl」沒有輸出 - 我想我沒有達到定義表達式。
bahat.yml看起來不正確 –
@CiaranMcNulty - 改名它到「behat.yml」。感謝您的注意。但它並沒有解決主要問題。 –