JSF 2.2.12、Prime Faces 6、およびOmnifacesでJava Webアプリケーションを作成しました。バックエンドでは、Spring、Hibernate、Application Serverの標準レイヤーはGlassfish 4.1.1です。 私はArquillianでいくつかのテストを実装しています。奇妙なのは、Linux(Ubuntu 16)では動作しますが、Windowsでは動作しません。Arquillian with Windows and Glassfish 4.1非常に遅い
ここに私のArquillian.xmlファイル
<?xml version="1.0"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container qualifier="glassfish" default="true">
<configuration>
<property name="remoteServerAddress">localhost</property>
<property name="remoteServerHttpPort">8080</property>
<property name="remoteServerAdminPort">4848</property>
</configuration>
</container>
<extension qualifier="webdriver">
<property name="browser">chrome</property>
<property name="remoteReusable">true</property>
</extension>
</arquillian>
そして、ここでテストクラスの一例
public class IndexFrontendTest extends BaseArquillianTest {
@Drone
private WebDriver browser;
@ArquillianResource
private URL deploymentUrl;
@Page
private IndexPage indexPage;
private FrontendTestComponent frontendTestComponent;
@Before
public void setUp() {
browser.manage().window().setSize(new Dimension(1920, 1080));
browser.get(deploymentUrl.toExternalForm());
frontendTestComponent = new FrontendTestComponent();
}
@RunAsClient
@Test
public void testCarManufacturersAndModels() {
indexPage.getCarManufacturersDropdown().selectByVisibleText("Ajax");
frontendTestComponent.waitForJStoLoad(browser);
frontendTestComponent.checkSelect(indexPage.getCarModelsDropdown(), 1, true);
}
@RunAsClient
@Test
public void testContinentsAndCountries() {
indexPage.getContinentsDropdown().selectByValue("1");
frontendTestComponent.waitForJStoLoad(browser);
frontendTestComponent.checkSelect(indexPage.getCountriesDropdown(), 45, true);
}
}
BaseArquillianTestクラスがデプロイ
@RunWith(Arquillian.class)
public abstract class BaseArquillianTest {
@Deployment(testable = true)
public static WebArchive createDeployment() throws IOException {
...
...
}
}
私のための唯一の静的メソッドを持っていますデブマシンはデュアルブートを持っています。 Linuxではテストに60秒かかります。 Windowsでは20分かかりますが、「Bad Request」のようなエラーが表示されることがあります。
私は2つの異なるブラウザ(phantomjsとクロム)を試してみたが、状況は同じ
である私は、インターネットで検索してみましたが、誰もがこのエラーを持っているように思わました。私は構成上いくつかの間違いをしていると思います。
私を助けてください。