cucumber.runtime.CucumberException: Failed to instantiate class

最后都变了- 提交于 2019-12-23 04:57:07

问题


Here is my cucumber base class.

@CucumberOptions(plugin = "json:target/cucumber-report.json", features="SFDC_Automation/features/featurefilename.feature", glue="classpath:tests.SFDC.StepDef")
public class InsideSaleTest extends AbstractTestNGCucumberTests {
}

And after running this base class, I am seeing following exception.

cucumber.runtime.CucumberException: Failed to instantiate class tests.SFDC.InsideSale.InsideSaleEndToEnd

===============================================

InsideSaleEndToEndTesting
Total tests run: 1, Failures: 1, Skips: 0

===============================================

Can some please help me resolve this issue? thanks a ton!


回答1:


I assume that your class file InsideSaleEndToEndTesting was containing annotations of JUnit and also glue codes/functions. Hence when cucumber tried to create a instance of InsideSaleEndToEndTesting, it had thrown these exceptions.



来源:https://stackoverflow.com/questions/35591099/cucumber-runtime-cucumberexception-failed-to-instantiate-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!