阿奎利安@Drone注射总是返回"about:blank"页面



我遇到这个问题已经两天了,我倾向于认为我的配置中有什么东西坏了。我将首先发布我的代码,然后解释:

public class MyTest extends Arquillian {
@Deployment(name = "MyPlatform", testable = false)
public static WebArchive createDeployment() {
WebArchive war;
war = ShrinkWrap
.create (WebArchive.class, "MyPlatform.war")
.merge (Maven
.resolver()
.loadPomFromFile("pom.xml")
.resolve("MyPlatform:My.Platform:war:0.0.1-SNAPSHOT")
.withoutTransitivity()
.asSingle(WebArchive.class));
return war;
}

@Drone
private PhantomJSDriver browser;
@ArquillianResource
private URL deploymentUrl;
@Test(dataProvider = Arquillian.ARQUILLIAN_DATA_PROVIDER) 
@RunAsClient
public void should_login_successfully(@InitialPage LoginPage loginPage) {
System.out.println ("ACTUAL: " + browser.getCurrentUrl ());
System.out.println ("DEPLOYMENT URL: " + deploymentUrl.toExternalForm ());
loginPage.login ("demo", "demo");
Assert.assertEquals (deploymentUrl.toExternalForm () + "index.tm", "https://127.0.0.1:8443/MyPlatform/index.tm");
}

@ArquillianResource注入工作正常,并显示正确的URL。然而,@Drone注射显示"大约:空白"。经过一些测试,我发现了一些奇怪的东西:

如果我的战争文件被称为MyPlatform.blabla.war,那么无人机在第一个"点"之后转换,我得到"http://127.0.0.1:8080/MyPlatform/login.tm",这不是我部署的。。。所以出于某种原因,@Drone总是转换我的部署URL,似乎找不到它的根。

这是我的POM,以防万一

<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<version>1.1.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<version>2.0.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-drone-bom</artifactId>
<version>1.2.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver</artifactId>
<version>2.0.1.Final</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver-spi</artifactId>
<version>2.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>graphene-webdriver-impl</artifactId>
<version>2.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.testng</groupId>
<artifactId>arquillian-testng-container</artifactId>
<version>1.1.2.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>2.0b4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
<scope>test</scope>
</dependency>

如果有人能帮我解决这个难题,我将不胜感激。。!

典型,在我发布问题后,我发现了问题,只是我的应用程序正在SSL上运行,而phantomjs没有从8080->8443重定向…

现在想办法做到这一点。。。

最新更新