Author: mgencur(a)redhat.com
Date: 2009-09-29 08:58:32 -0400 (Tue, 29 Sep 2009)
New Revision: 11519
Modified:
branches/community/Seam_2_2/src/test/ftest/build.xml
branches/community/Seam_2_2/src/test/ftest/examples/build.xml
branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml
branches/community/Seam_2_2/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java
Log:
JBSEAM-4430 Ftest libraries replaced with maven dependencies
Modified: branches/community/Seam_2_2/src/test/ftest/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/build.xml 2009-09-29 04:35:20 UTC (rev
11518)
+++ branches/community/Seam_2_2/src/test/ftest/build.xml 2009-09-29 12:58:32 UTC (rev
11519)
@@ -35,7 +35,7 @@
<!-- TODO : should the libs be in seam/lib and managed with mvn? -->
<property name="lib.dir" value="${ftest.dir}/lib" />
<property name="log.dir" value="${ftest.dir}/log" />
-
+
<!-- Build resources -->
<import file="${seam.dir}/build/common.build.xml" />
@@ -276,8 +276,21 @@
<undeployexample name="wicket" />
</target>
-
+ <!-- Target for declaring needed libraries for tests to run -->
+ <target name="import.libraries">
+ <copyInlineDependencies id="selenium.server" scope="compile"
todir="${lib.dir}">
+ <dependency groupId="org.seleniumhq.selenium.server"
artifactId="selenium-server" version="1.0-beta-2"
classifier="standalone"/>
+ <dependency groupId="org.seleniumhq.selenium.client-drivers"
artifactId="selenium-java-client-driver" version="1.0-beta-2">
+ <exclusion groupId="org.codehaus.groovy.maven.runtime"
artifactId="gmaven-runtime-default"/>
+ </dependency>
+ <dependency groupId="org.jboss.test" artifactId="jboss-test"
version="1.1.0.GA"/>
+ </copyInlineDependencies>
+ </target>
+
<target name="start.selenium.server">
+ <!-- Added for downloading libraries -->
+ <antcall target="import.libraries"> </antcall>
+
<java classpathref="selenium.server.classpath"
classname="org.openqa.selenium.server.SeleniumServer" fork="true"
spawn="true">
<arg line="-port ${selenium.server.port}" />
<arg line="${selenium.server.cmd.args}" />
Modified: branches/community/Seam_2_2/src/test/ftest/examples/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/build.xml 2009-09-29 04:35:20 UTC
(rev 11518)
+++ branches/community/Seam_2_2/src/test/ftest/examples/build.xml 2009-09-29 12:58:32 UTC
(rev 11519)
@@ -54,11 +54,13 @@
<property name="tomcat6.context.path"
value="${jboss-embedded.context.path}" />
<property name="functional.listener"
value="org.jboss.seam.example.common.test.selenium.SeleniumFunctionalTestListener"/>
+ <property name="root.lib.dir" value="${seam.dir}/lib" />
<!-- common path setup -->
<path id="classpath.build">
+ <fileset dir="${root.lib.dir}" includes="**/*.jar" />
<fileset dir="${ftest.lib.dir}" includes="**/*.jar" />
</path>
Modified: branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml 2009-09-29 04:35:20 UTC
(rev 11518)
+++ branches/community/Seam_2_2/src/test/ftest/seamgen/build.xml 2009-09-29 12:58:32 UTC
(rev 11519)
@@ -24,6 +24,9 @@
<!-- Location of Seam -->
<dirname property="seam.dir"
file="${ant.file.ftest.seamgen}/../../../../" />
+
+ <!-- Build resources -->
+ <import file="${seam.dir}/build/common.build.xml" />
<!-- default property setup -->
<property name="ftest.dir" value="${seam.dir}/src/test/ftest"
/>
@@ -33,6 +36,7 @@
<property name="classes.dir" value="${build.dir}/classes" />
<property name="test.output.dir" value="${seam.dir}/test-output"
/>
<property name="ftest.lib.dir" value="${ftest.dir}/lib" />
+ <property name="root.lib.dir" value="${seam.dir}/lib" />
<property file="${seam.dir}/${ftest.config.location}" />
@@ -40,6 +44,7 @@
<path id="classpath.build">
<fileset dir="${ftest.lib.dir}" includes="**/*.jar" />
+ <fileset dir="${root.lib.dir}" includes="testng.jar" />
</path>
<path id="classpath.test">
@@ -59,6 +64,18 @@
<delete dir="${log.dir}" />
</target>
+ <!-- Target for declaring needed libraries for tests runs -->
+ <target name="import.libraries">
+ <copyInlineDependencies id="selenium.server" scope="compile"
todir="${ftest.lib.dir}">
+ <dependency groupId="org.seleniumhq.selenium.server"
artifactId="selenium-server" version="1.0-beta-2"
classifier="standalone"/>
+ <dependency groupId="org.seleniumhq.selenium.client-drivers"
artifactId="selenium-java-client-driver" version="1.0-beta-2">
+ <exclusion groupId="org.codehaus.groovy.maven.runtime"
artifactId="gmaven-runtime-default"/>
+ </dependency>
+ <dependency groupId="org.apache.ant" artifactId="ant"
version="1.7.0"/>
+ <dependency groupId="org.apache.ant" artifactId="ant-launcher"
version="1.7.0"/>
+ </copyInlineDependencies>
+ </target>
+
<target name="build" depends="build.common"
description="Compiles the Test">
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}"
classpathref="classpath.build" debug="true" />
@@ -70,6 +87,9 @@
</target>
<target name="build.common" description="Compiles the common selenium
test code">
+ <!-- Added for downloading libraries -->
+ <antcall target="import.libraries"> </antcall>
+
<mkdir dir="${classes.dir}" />
<javac srcdir="${common.src.dir}" destdir="${classes.dir}"
classpathref="classpath.build" debug="true" />
<copy todir="${classes.dir}">
Modified:
branches/community/Seam_2_2/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java
===================================================================
---
branches/community/Seam_2_2/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java 2009-09-29
04:35:20 UTC (rev 11518)
+++
branches/community/Seam_2_2/src/test/ftest/seamgen/src/main/org/jboss/seam/test/functional/seamgen/SeamGenTest.java 2009-09-29
12:58:32 UTC (rev 11519)
@@ -29,12 +29,6 @@
import java.util.Properties;
import java.util.StringTokenizer;
-import org.codehaus.cargo.container.InstalledLocalContainer;
-import org.codehaus.cargo.container.LocalContainer;
-import org.codehaus.cargo.container.configuration.LocalConfiguration;
-import org.codehaus.cargo.container.jboss.JBoss42xInstalledLocalContainer;
-import org.codehaus.cargo.container.jboss.JBoss5xInstalledLocalContainer;
-import org.codehaus.cargo.container.jboss.JBossExistingLocalConfiguration;
import org.jboss.seam.test.functional.seamgen.utils.SeamGenAdapter;
import org.openqa.selenium.server.RemoteControlConfiguration;
import org.openqa.selenium.server.SeleniumServer;
@@ -74,8 +68,6 @@
protected static boolean DELETE_PROJECT;
- protected static boolean CONTROL_CONTAINER;
-
protected static String TEST_SEAMGEN_PROPERTIES_FILE;
// Selenium related constants
@@ -96,8 +88,6 @@
// Selenium server instance
protected static SeleniumServer seleniumServer;
- // Container instance
- protected static LocalContainer container;
@BeforeSuite
@Parameters("seam.dir")
@@ -123,20 +113,12 @@
loadFtestProperties();
createOutputDir();
startSeleniumServer();
- if (CONTROL_CONTAINER)
- {
- container = startContainer(CONTAINER, CONTAINER_LOCATION);
- }
}
@AfterSuite
public void afterSuite()
{
seleniumServer.stop();
- if (container != null)
- {
- stopContainer(container);
- }
}
@BeforeTest
@@ -180,7 +162,6 @@
CONTAINER_LOCATION = getProperty(ftestProperties, CONTAINER + ".home");
DEPLOY_TIMEOUT = Integer.parseInt(getProperty(ftestProperties, CONTAINER +
".deploy.waittime")) * 1000; // miliseconds
DELETE_PROJECT = Boolean.valueOf(getProperty(ftestProperties,
"seamgen.delete.project", "false"));
- CONTROL_CONTAINER = Boolean.valueOf(getProperty(ftestProperties,
"seamgen.control.container", "false"));
// load selenium constants
SELENIUM_HOST = getProperty(ftestProperties, "selenium.host");
@@ -328,36 +309,5 @@
{
dir.mkdir();
}
- }
-
- public LocalContainer startContainer(String containerName, String containerHome)
- {
-
- LocalConfiguration configuration = new
JBossExistingLocalConfiguration(containerHome + "/server/default");
-
- InstalledLocalContainer container;
-
- if (containerName.equals("jboss4"))
- {
- container = new JBoss42xInstalledLocalContainer(configuration);
-
- }
- else if (containerName.equals("jboss5"))
- {
- container = new JBoss5xInstalledLocalContainer(configuration);
- }
- else
- {
- throw new RuntimeException("Unknown container");
- }
- container.setHome(containerHome);
-
- container.start();
- return container;
- }
-
- public void stopContainer(LocalContainer container)
- {
- container.stop();
- }
+ }
}
\ No newline at end of file
Show replies by date