2017-03-03 73 views
0

我想從我的java項目中使用BDD風格的testscripts調用testcomplete的關鍵字測試。遵循此tutorial中提到的所有步驟。執行失敗,跟隨堆棧跟蹤:java.lang.Exception:TestComplete/TestExecute not found

java.lang.Exception: TestComplete/TestExecute not found 
at com.smartbear.cucumber.TestComplete.<init>(TestComplete.java:42) 
at com.example.testingNotepad.World.TC(Steps.java:64) 
at com.example.testingNotepad.Steps.before(Steps.java:47) 
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:223) 
at cucumber.runtime.Runtime.runHooks(Runtime.java:211) 
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:201) 
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40) 
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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) 
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) 
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) 

請建議一種方法來觸發testcomplete關鍵字測試。

+0

似乎文章中的庫在系統註冊表中找不到關於已安裝的TestComplete \ TestExecute的信息。它使用「TestComplete.TestCompleteApplication」和「TestExecute.TestExecuteApplication」程序ID來查找已安裝的應用程序之一。確保你有一個合適的鑰匙。我看到的最簡單的解決方案 - 重新安裝TestComplete或TestExecute。安裝程序必須將正確的密鑰放入註冊表中。 –

回答

0

我一直在遇到同樣的錯誤,我發現我的解決方案:「重新安裝帶有禁用防病毒和Windows防火牆的TestComplete是有意義的,以防萬一,您可以嘗試禁用TestComplete中的Windows應用商店應用程序支持工具 - >選項 - >引擎 - >常規 - >啓用對測試Windows Store應用程序的支持)。也許,這將有所幫助。「這個對我有用。希望這也能幫助你!