<properties>
<webappDirectory>${project.build.directory}/tomcat7x/webapps/archiva</webappDirectory>
+ <container.test.port>0</container.test.port>
+ <tomcat.propertiesPortFilePath>${project.build.directory}/tomcat-port.properties</tomcat.propertiesPortFilePath>
</properties>
<dependencies>
<maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs>
<seleniumHost>${seleniumHost}</seleniumHost>
<seleniumPort>${seleniumPort}</seleniumPort>
+ <tomcat.propertiesPortFilePath>${tomcat.propertiesPortFilePath}</tomcat.propertiesPortFilePath>
</systemPropertyVariables>
</configuration>
</execution>
</tasks>
</configuration>
</execution>
- <execution>
+ <!--execution>
<id>check-archiva-loaded</id>
<phase>integration-test</phase>
<configuration>
<goals>
<goal>run</goal>
</goals>
- </execution>
+ </execution-->
</executions>
</plugin>
<plugin>
<archiva.devMode>true</archiva.devMode>
</systemProperties>
<contextFile>${project.build.testOutputDirectory}/archiva.xml</contextFile>
+ <propertiesPortFilePath>${tomcat.propertiesPortFilePath}</propertiesPortFilePath>
<useNaming>true</useNaming>
</configuration>
</execution>
import org.junit.Rule;
import java.io.File;
+import java.io.FileInputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
public String browser = System.getProperty( "browser" );
- public String baseUrl = System.getProperty( "baseUrl" );
+ public String baseUrl =
+ "http://localhost:" + System.getProperty( "tomcat.maven.http.port" ) + "/archiva/index.html?request_lang=en";
public int maxWaitTimeInMs = Integer.getInteger( "maxWaitTimeInMs" );
{
p = new Properties();
p.load( this.getClass().getClassLoader().getResourceAsStream( "test.properties" ) );
+
+ Properties tomcatPortProperties = new Properties();
+ tomcatPortProperties.load(
+ new FileInputStream( new File( System.getProperty( "tomcat.propertiesPortFilePath" ) ) ) );
+
+ int tomcatPort = Integer.parseInt( tomcatPortProperties.getProperty( "tomcat.maven.http.port" ) );
+
+ baseUrl = "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en";
+
open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs );
archivaSeleniumExecutionRule.selenium = selenium;
assertAdminCreated();