2017-05-08 140 views
0

我試圖運行黃瓜測試,但我收到以下異常。我用這些器皿裏的版本運行Cucumber Junit測試時出錯:Intializationerror

enter image description here

這是我的項目:

enter image description here

這是的TestRunner類代碼:

package cucumberTest; 

import org.junit.runner.RunWith; 
import cucumber.api.CucumberOptions; 
import cucumber.api.junit.Cucumber; 

@RunWith(Cucumber.class) 
@CucumberOptions(
     features = "Feature" 
     ,glue={"stepDefinition"} 
     ) 

     public class TestRunner { 

     } 

在logIn.feature file:

功能:登錄操作測試

情景:成功登錄使用有效憑據 給定用戶在主頁上 當用戶瀏覽到登錄頁面 和用戶輸入用戶名和密碼 然後消息顯示登錄成功

方案:成功的註銷 當從應用 用戶退出然後消息顯示註銷成功

回答

1

根據this,黃瓜的Java-1.2.5需要小黃瓜-2.12.2,當我提供小黃瓜-4.1.13

因此,我從here下載了版本2.12.2,刪除了版本4.1.13,它爲我工作(我做了一個乾淨的項目)。