0

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!

Rao
  • 20,781
  • 11
  • 57
  • 77
Umang
  • 11
  • 1
  • 1
  • 4
  • 1
    You need to give us more details here... What is the structure of your project? In particular, where is the `tests.SFDC.InsideSale.InsideSaleEndToEnd` class, and where does it get called? – Sébastien Le Callonnec Feb 24 '16 at 09:13
  • 1) I have created StepsDefs(InsideSaleEndToEnd.java) created under "src/tests/SFDC/InsideSale. 2) I have created feature file under workspace/Project/Features/feauter*.feature. 3) I have created InsidesaleBase.java created under "src/tests/BaseClasses" 4) I have xml file which is calling InsideSale Base file and InsideSaleBase class has (@cucumberoptions(plugin = "json:target/cucumber-report.json", features="SFDC_Automation/features/featurefilename.feature", glue="classpath:tests.SFDC.StepDef") -- And my stepdefs designed as (public class InsideSaleEndToEnd extend 'class' implements 'class') – Umang Feb 24 '16 at 17:01
  • Never mind, Figured out my solution. File structure was wrong. Fixed it. Thanks! – Umang Feb 24 '16 at 21:18
  • Could you please give a bit mor details? I'm facing the same errormessage, and actually i don't see what's wrong with my system. – roli Mar 01 '16 at 13:37
  • You might give the wrong path of the property file . Please check – SC' Oct 17 '18 at 05:30

1 Answers1

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.

Bhuvanesh Mani
  • 1,394
  • 14
  • 23