1
を主張私たちは、おおよそのJBoss Wildfly 10は、ローカルホスト
これはArquillianの新しいバージョンに付属と同じであるのJBoss EAP 7に切り替え、そして今、私は」すべてをテストしようとしている。
テストはローカルJBoss上で動作するローカルマシン上で動作します。しかし、JBossサーバー(別のマシン)に接続するビルドサーバーでそれらを実行しようとすると、テストは失敗します。
テスト後にテストWARが展開され、削除されたことがサーバーログに表示されます。しかし、テスト中に、Arquillianは、ローカルホストに接続したい:
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.294 sec <<< FAILURE! - in itest.com.mydomain.esv.dds.bo.DDSDokumentI18NTest
testI18NKeys(itest.com.mydomain.esv.dds.bo.DDSDokumentI18NTest) Time elapsed: 1.024 sec <<< ERROR!
java.lang.IllegalStateException: Error launching test itest.com.mydomain.esv.dds.bo.DDSDokumentI18NTest public void com.mydomain.esv.util.testing.i18n.I18NTestBase.testI18NKeys()
...
Caused by: java.lang.IllegalStateException: Error launching request at http://localhost:8080/dds-adapter-api-itest/ArquillianServletRunner?outputMode=serializedObject&className=itest.com.mydomain.esv.dds.bo.DDSDokumentI18NTest&methodName=testI18NKeys. No result returned
at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:139)
at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.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.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
ここに私のarquillian.xmlです:
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- Force the use of the Servlet 3.0 protocol with all containers, as it is the most mature -->
<defaultProtocol type="Servlet 3.0" />
<!-- Example configuration for a remote JBoss EAP instance -->
<container qualifier="jboss-remote" default="true">
<configuration>
<property name="managementAddress">foobar.mydomain.com</property>
<property name="managementPort">9990</property>
<property name="username">admin</property>
<property name="password">password</property>
</configuration>
</container>
</arquillian>
は、これらは私の関連する依存関係(我々は、JBoss EAP 7.0.4を使用している)、次のとおりです。
<dependency>
<groupId>org.jboss.bom</groupId>
<artifactId>jboss-eap-javaee7-with-tools</artifactId>
<version>7.0.4.GA</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<type>pom</type>
<scope>test</scope>
<version>2.2.2</version>
<exclusions>
<exclusion>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>1.1.11.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
<version>2.0.0.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<version>1.1.11.Final</version>
<scope>test</scope>
</dependency>
ここでのテストクラスです:
@RunWith(Arquillian.class)
public class DDSDokumentI18NTest extends DDSArquillianI18NFieldEnumSupplierTest {
/**
* {@inheritDoc}
*/
@Override
protected FieldEnumSupplier getFieldEnumSupplier() {
return new DDSDokument();
}
}
とその基底クラス:
@RunWith(Arquillian.class)
public abstract class DDSArquillianI18NFieldEnumSupplierTest extends FieldEnumSupplierI18NTestBase<I18NService> {
@Inject
private I18NService i18nService;
/**
* Creates the deployment for the test.
* @return the deployment
*/
@Deployment
public static Archive<?> createDeployment() {
return DDSArquillianIntegrationTest.createCoreDeployment();
}
/**
* {@inheritDoc}
*/
@Override
protected Map<String, String> getI18NKeysAndValues() {
final Map<I18NLanguage, Map<String, String>> values = getService().getValues(DDSArquillianI18NTest.I18N_PATTERNS);
return values.get(I18NLanguage.GERMAN);
}
/**
* {@inheritDoc}
*/
@Override
public I18NService getService() {
return this.i18nService;
}
}
は私が間違って何をしているのですか?
コンテナアダプタの依存関係は何ですか? –
私は関連する依存関係を追加しました。何か助けてくれてありがとう! – eerriicc
完全な画像については、テストクラスを見るのはすばらしいことでしょう。 –