Forum Discussion

HelenMa's avatar
HelenMa
New Contributor
7 years ago

BDD + CUCUMBER + TC by following your example https://support.smartbear.com/articles/testcomplete/

Hi,

 

I have built the project in IntelliJ and followed all the steps mentioned in this https://support.smartbear.com/articles/testcomplete/bdd-cucumber-and-testcomplete/. I have also read the post https://community.smartbear.com/t5/TestComplete-General-Discussions/BDD-CUCUMBER-TC/m-p/146755/highlight/true#M27179.

 

So I have already checked that (1) I have installed test complete and test execute (official version NOT the trail version) on my pc; (2) I have already run test complete and Intellij by using administrator role; (3) I have set up the path in ProjectStructure->Libraries to TestComplete.jar; (4) I have added M2_home and M2 path to maven in system variables. 

 

But I still have the following errors when I execute from IntelliJ from the TestRuner: So could you please help to find out where the problem is coming from? Thanks a lot.

 

java.lang.Exception: TestComplete/TestExecute not found
at com.smartbear.cucumber.TestComplete.<init>(TestComplete.java:42)
at NewTC.World.TC(steps.java:71)
at NewTC.steps.before(steps.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:37)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.Utils.invoke(Utils.java:31)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:59)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

java.lang.IllegalArgumentException: Can't pass in null Dispatch object

at com.jacob.com.Dispatch.throwIfUnattachedDispatch(Dispatch.java:283)
at com.jacob.com.Dispatch.get(Dispatch.java:1257)
at com.smartbear.cucumber.TestComplete.GetIntegration(TestComplete.java:100)
at com.smartbear.cucumber.TestComplete.GetLog(TestComplete.java:152)
at NewTC.steps.before(steps.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at cucumber.runtime.Utils$1.call(Utils.java:37)
at cucumber.runtime.Timeout.timeout(Timeout.java:13)
at cucumber.runtime.Utils.invoke(Utils.java:31)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:59)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:222)
at cucumber.runtime.Runtime.runHooks(Runtime.java:210)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:200)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

 

  • Hi all,

     

    After contacting the support from TestComplete, I run the example successfully. Hope the solution will also help you.

     

    Here is the solution: "it would make sense to reinstall TestComplete with the disabled antivirus and Windows Firewall. Just in case, you can try disabling the Windows Store applications support in TestComplete (Tools->Options->Engines->General->Enable support for testing Windows Store applications). Perhaps, this will help."

  • avidCoder's avatar
    avidCoder
    Super Contributor

    Could you please retry to start IntelliJ and  Test Complete through administrator and then rerun the testRunner class.

  • HelenMa's avatar
    HelenMa
    New Contributor

    Hi all,

     

    After contacting the support from TestComplete, I run the example successfully. Hope the solution will also help you.

     

    Here is the solution: "it would make sense to reinstall TestComplete with the disabled antivirus and Windows Firewall. Just in case, you can try disabling the Windows Store applications support in TestComplete (Tools->Options->Engines->General->Enable support for testing Windows Store applications). Perhaps, this will help."