我正在尝试为GAE容器运行Arquillian测试,但是我收到此错误:
com.google.apphosting.utils.config.AppEngineConfigException: Could not locate /tmp/servlet-test.war/WEB-INF/appengine-web.xml
at com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)com.google.apphosting.utils.config.AppEngineWebXmlReader.getInputStream(AppEngineWebXmlReader.java:140)
我所有其他非Arquillian测试工作正常,不确定为什么会发生这种情况,我应该将appengine-web.xml
放入测试文件夹吗?或者在/src/main/webapp/WEB-INF
中使用它应该没问题?
同样在Maven surefire报告中,我可以看到:
com.mycompany.AnnotatedEchoServletTestCase Time elapsed: 1.131 sec <<< ERROR!
java.lang.NoSuchMethodError: com.google.appengine.tools.development.DevAppServer.start()Ljava/util/concurrent/CountDownLatch;
at org.jboss.arquillian.container.appengine.embedded.AppEngineEmbeddedContainer.doDeploy(AppEngineEmbeddedContainer.java:74)
我正在使用GAE容器运行此AnnotatedEchoServletTestCase。
我的应用在应用中具有此依赖关系:
<!-- Added for GAE Arquillian Testing -->
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>${version.arquillian}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${version.slf4j}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.descriptors</groupId>
<artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-gae-embedded</artifactId>
<version>1.0.0.Beta7</version>
</dependency>
<!-- End GAE Arquillian Testing -->
我的配置中可能缺少什么?