0
我創建了一個JSF 2.2.12,Prime Faces 6和Omnifaces的Java Web應用程序。在後端我有像Spring,Hibernate和我的應用服務器的標準圖層是Glassfish 4.1.1 我正在用Arquillian實施一些測試。奇怪的是,在Linux(Ubuntu 16)的作品,但與Windows不起作用。測試類的Arquillian與Windows和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分鐘,有時我會看到「錯誤請求」等錯誤。
我已經試過2個不同的瀏覽器(phantomjs和鉻),但情況是一樣的
我試過互聯網上搜索,但似乎是任何人有這個錯誤。我想我在配置上犯了一些錯誤。
請幫助我嗎?