2016-02-29 89 views
3

下面的Java類不能在我的IDE(Intellij IDEA)中運行。 IDE沒有給出任何理由,這使故障排除變得困難和困難。Java @RunWith無法在Intellij中運行

類看起來是這樣的:

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

@RunWith(Cucumber.class) 
@CucumberOptions 
class AcceptanceTests { 
} 
+1

嗨,只是想知道這個問題是如何脫離主題嗎?這既不是不可重現的,也不是印刷錯誤 - 所以提供的理由沒有意義。謝謝! –

+1

我同意......應該打開。我加了我的投票。 – Avi

回答

3

解決辦法:被要求在類public訪問級別修飾符。

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

@RunWith(Cucumber.class) 
@CucumberOptions 
public class AcceptanceTests { 
}