2017-01-23 8 views
1

나는 jquit runner 클래스의 Cukespace를 통해 arquillian-graphene 및 arquillian-drone을 사용하는 단계 정의가있는 오이 기능을 실행하려고합니다. 하지만 (테스트를 통해) junit 테스트를 실행하려고 할 때마다 '기능을 찾을 수 없음'오류가 나타납니다. 이 기능 파일은 src/test/java/features에 있습니다. 누구나 이것이 일어나는 이유와 해결 방법을 알아낼 수 있습니까? ArquillianCucumber는 기능 파일을 찾을 수 없습니다

JUnit 테스트 클래스

package features; 

import org.jboss.arquillian.container.test.api.RunAsClient; 
import org.junit.runner.RunWith; 
import cucumber.runtime.arquillian.CukeSpace; 
import cucumber.runtime.arquillian.api.Features; 
import cucumber.runtime.arquillian.api.Glues; 

@RunWith(CukeSpace.class) 
@Features("src/test/java/feature/SearchAutoAompletion.feature") 
@Glues(features.stepdefinitions.SearchAutoCompletion.class) 
@RunAsClient 
public class TestsRunner { 
} 

Arquillian.xml

<?xml version="1.0" encoding="UTF-8"?> 

<arquillian> 

<!-- clip --> 
<extension qualifier="webdriver"> 
    <property name="browser">${browser}</property> 
</extension> 
<!-- clip --> 

<extension qualifier="cucumber"> 
<property name="report">true</property> 
<property name="reportDirectory">target/cucumber-report</property> 
<property name="featureHome">src/test/java/features</property> 
<property name="tempDir">target/custom/features</property> 
</extension> 

</arquillian> 

전체 오류 메시지 :

java.lang.IllegalArgumentException: No feature found 
at cucumber.runtime.arquillian.ArquillianCucumber.buildFeatureList(ArquillianCucumber.java:233) 
at cucumber.runtime.arquillian.ArquillianCucumber.getCucumberFeatures(ArquillianCucumber.java:187) 
at cucumber.runtime.arquillian.ArquillianCucumber.performInternalCucumberOperations(ArquillianCucumber.java:136) 
at cucumber.runtime.arquillian.ArquillianCucumber$InstanceControlledFrameworkMethod.invokeExplosively(ArquillianCucumber.java:452) 
at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:374) 
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) 
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) 
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) 
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) 
at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) 
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) 
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) 
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136) 
at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:367) 
at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245) 
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:426) 
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54) 
at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259) 
at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:319) 
at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99) 
at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) 
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) 
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) 
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 org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) 
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) 
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) 
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) 
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159) 
at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:312) 
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) 
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) 
at cucumber.runtime.arquillian.ArquillianCucumber.runChild(ArquillianCucumber.java:123) 
at cucumber.runtime.arquillian.ArquillianCucumber.runChild(ArquillianCucumber.java:72) 
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.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204) 
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:426) 
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54) 
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218) 
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) 
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166) 
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:114) 
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:57) 
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:66) 
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) 
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 org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) 
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) 
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32) 
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) 
at com.sun.proxy.$Proxy3.processTestClass(Unknown Source) 
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:109) 
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 org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) 
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) 
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377) 
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54) 
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at java.lang.Thread.run(Thread.java:745) 

JDK 1.8를 사용하여, 프로젝트 종속성은 다음과 같습니다

dependencies { 
// https://mvnrepository.com/artifact/com.github.cukespace/cukespace- core 
compile group: 'com.github.cukespace', name: 'cukespace-core', version: '1.6.3' 
// https://mvnrepository.com/artifact/info.cukes/cucumber-java8 
compile group: 'info.cukes', name: 'cucumber-java8', version: '1.2.5' 
//https://mvnrepository.com/artifact/org.jboss.arquillian.graphene/graphene-webdriver 
compile group: 'org.jboss.arquillian.graphene', name: 'graphene-webdriver', version: '2.1.0.Final' 
//https://mvnrepository.com/artifact/org.jboss.arquillian.extension/arquillian-drone-webdriver-depchain 
compile group: 'org.jboss.arquillian.extension', name: 'arquillian-drone-webdriver-depchain', version: '2.0.1.Final' 
// https://mvnrepository.com/artifact/junit/junit 
compile group: 'junit', name: 'junit', version: '4.12' 
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java 
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.0.1' 
// https://mvnrepository.com/artifact/info.cukes/cucumber-junit 
compile group: 'info.cukes', name: 'cucumber-junit', version: '1.2.5' 
// https://mvnrepository.com/artifact/com.github.cukespace/cukespace-parent 
compile group: 'com.github.cukespace', name: 'cukespace-parent', version: '1.6.3' 
} 

답변

0

이 같은 코드를 시도 할 수 있습니다 :

@Features({ "classpath: test/java/feature/SearchAutoAompletion.feature" }) 
+0

불행히도 또한 내가 이미 게시 같은 오류를 제공하는. 나는 또한 @Features ({ "classpath : src/test/java/feature/SearchAutoAompletion.feature"})를 시도했지만 그 역시 같은 오류를 준다. ( – ltcolumb

+0

재미있는, S 및 @Features ("src/test/java/feature/SearchAutoAompletion.feature") .../feature/S를 코딩하면 문제가 해결 될 수 있습니다. D – Stankevix